summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/control/marktree.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2002-04-29 07:49:48 +0000
committerOcke Janssen <oj@openoffice.org>2002-04-29 07:49:48 +0000
commit6f50b222758cc4cac01e3179fb776d39036ac819 (patch)
treefa8f9bb38e74895cb1dc025f378d8777ead934a6 /dbaccess/source/ui/control/marktree.cxx
parent#98772# many new bitmaps (diff)
downloadcore-6f50b222758cc4cac01e3179fb776d39036ac819.tar.gz
core-6f50b222758cc4cac01e3179fb776d39036ac819.zip
#98772# hi contrast changes
Diffstat (limited to 'dbaccess/source/ui/control/marktree.cxx')
-rw-r--r--dbaccess/source/ui/control/marktree.cxx34
1 files changed, 23 insertions, 11 deletions
diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx
index f34517ba5d54..0773c97ab65f 100644
--- a/dbaccess/source/ui/control/marktree.cxx
+++ b/dbaccess/source/ui/control/marktree.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: marktree.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: fs $ $Date: 2001-06-20 09:53:46 $
+ * last change: $Author: oj $ $Date: 2002-04-29 08:49:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,13 +83,11 @@ namespace dbaui
//------------------------------------------------------------------------
OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, WinBits nWinStyle ) : SvTreeListBox(pParent,nWinStyle)
{
- SetNodeBitmaps( Bitmap(ModuleRes(BMP_PLUSBUTTON)),Bitmap(ModuleRes(BMP_MINUSBUTTON)));
InitButtonData();
}
//------------------------------------------------------------------------
-OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const ResId& rResId ) : SvTreeListBox(pParent,rResId)
+OMarkableTreeListBox::OMarkableTreeListBox( Window* pParent, const ResId& rResId) : SvTreeListBox(pParent,rResId)
{
- SetNodeBitmaps( Bitmap(ModuleRes(BMP_PLUSBUTTON)),Bitmap(ModuleRes(BMP_MINUSBUTTON)));
InitButtonData();
}
//------------------------------------------------------------------------
@@ -97,6 +95,18 @@ OMarkableTreeListBox::~OMarkableTreeListBox()
{
delete m_pCheckButton;
}
+// -----------------------------------------------------------------------------
+void OMarkableTreeListBox::notifyHiContrastChanged()
+{
+ OSL_ENSURE(m_pCheckButton,"No CheckButton!");
+ sal_Bool bHiContrast = GetBackground().GetColor().IsDark();
+ m_pCheckButton->aBmps[SV_BMP_UNCHECKED] = Bitmap( ResId( bHiContrast ? BMP_CHECKBUTTON_UNCHECKED_SCH : BMP_CHECKBUTTON_UNCHECKED ) );
+ m_pCheckButton->aBmps[SV_BMP_CHECKED] = Bitmap( ResId( bHiContrast ? BMP_CHECKBUTTON_CHECKED_SCH : BMP_CHECKBUTTON_CHECKED ) );
+ m_pCheckButton->aBmps[SV_BMP_HICHECKED] = Bitmap( ResId( bHiContrast ? BMP_CHECKBUTTON_HICHECKED_SCH : BMP_CHECKBUTTON_HICHECKED ) );
+ m_pCheckButton->aBmps[SV_BMP_HIUNCHECKED] = Bitmap( ResId( bHiContrast ? BMP_CHECKBUTTON_UNCHECKED_SCH : BMP_CHECKBUTTON_UNCHECKED ) );
+ m_pCheckButton->aBmps[SV_BMP_TRISTATE] = Bitmap( ResId( bHiContrast ? BMP_CHECKBUTTON_TRISTATE_SCH : BMP_CHECKBUTTON_TRISTATE ) );
+ m_pCheckButton->aBmps[SV_BMP_HITRISTATE] = Bitmap( ResId( bHiContrast ? BMP_CHECKBUTTON_HITRISTATE_SCH : BMP_CHECKBUTTON_HITRISTATE ) );
+}
//------------------------------------------------------------------------
void OMarkableTreeListBox::Paint(const Rectangle& _rRect)
{
@@ -118,13 +128,12 @@ void OMarkableTreeListBox::Paint(const Rectangle& _rRect)
//------------------------------------------------------------------------
void OMarkableTreeListBox::InitButtonData()
{
+ sal_Bool bHiContrast = GetBackground().GetColor().IsDark();
+ SetNodeBitmaps( Bitmap(ModuleRes( bHiContrast ? BMP_PLUSBUTTON_SCH : BMP_PLUSBUTTON)),
+ Bitmap(ModuleRes( bHiContrast ? BMP_MINUSBUTTON_SCH : BMP_MINUSBUTTON)));
+
m_pCheckButton = new SvLBoxButtonData();
- m_pCheckButton->aBmps[SV_BMP_UNCHECKED] = Bitmap( ResId( BMP_CHECKBUTTON_UNCHECKED ) );
- m_pCheckButton->aBmps[SV_BMP_CHECKED] = Bitmap( ResId( BMP_CHECKBUTTON_CHECKED ) );
- m_pCheckButton->aBmps[SV_BMP_HICHECKED] = Bitmap( ResId( BMP_CHECKBUTTON_HICHECKED ) );
- m_pCheckButton->aBmps[SV_BMP_HIUNCHECKED] = Bitmap( ResId( BMP_CHECKBUTTON_UNCHECKED ) );
- m_pCheckButton->aBmps[SV_BMP_TRISTATE] = Bitmap( ResId( BMP_CHECKBUTTON_TRISTATE ) );
- m_pCheckButton->aBmps[SV_BMP_HITRISTATE] = Bitmap( ResId( BMP_CHECKBUTTON_HITRISTATE ) );
+ OMarkableTreeListBox::notifyHiContrastChanged();
EnableCheckButton( m_pCheckButton );
}
//------------------------------------------------------------------------
@@ -358,6 +367,9 @@ SvLBoxEntry* OMarkableTreeListBox::GetEntryPosByName(const String& aName,SvLBoxE
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.5 2001/06/20 09:53:46 fs
+ * #88485# corrected implDetermineState for a special case
+ *
* Revision 1.4 2001/04/27 08:10:27 fs
* +implDeterminedState - needed to correctly implement CheckButtons
*