diff options
author | Frank Schönheit <fs@openoffice.org> | 2000-10-09 11:34:33 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2000-10-09 11:34:33 +0000 |
commit | 8a27b3be4e47e94076908117ab40a340e65ed9e2 (patch) | |
tree | f8c1744d1366f1966d1c1b079da3b8bb40998e86 | |
parent | initial checkin (diff) | |
download | core-8a27b3be4e47e94076908117ab40a340e65ed9e2.tar.gz core-8a27b3be4e47e94076908117ab40a340e65ed9e2.zip |
use a different font when painting a disabled control
-rw-r--r-- | dbaccess/source/ui/control/marktree.cxx | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx index 5d51c931719c..1b0b694903ab 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.1 $ + * $Revision: 1.2 $ * - * last change: $Author: fs $ $Date: 2000-10-05 10:00:43 $ + * last change: $Author: fs $ $Date: 2000-10-09 12:34:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,6 +68,9 @@ #ifndef _DBU_RESOURCE_HRC_ #include "dbu_resource.hrc" #endif +#ifndef _SV_SVAPP_HXX +#include <vcl/svapp.hxx> +#endif //......................................................................... namespace dbaui @@ -95,6 +98,24 @@ OMarkableTreeListBox::~OMarkableTreeListBox() delete m_pCheckButton; } //------------------------------------------------------------------------ +void OMarkableTreeListBox::Paint(const Rectangle& _rRect) +{ + if (!IsEnabled()) + { + Font aOldFont = GetFont(); + Font aNewFont(aOldFont); + + StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); + aNewFont.SetColor(aSystemStyle.GetDisableColor()); + + SetFont(aNewFont); + SvTreeListBox::Paint(_rRect); + SetFont(aOldFont); + } + else + SvTreeListBox::Paint(_rRect); +} +//------------------------------------------------------------------------ void OMarkableTreeListBox::InitButtonData() { m_pCheckButton = new SvLBoxButtonData(); @@ -234,6 +255,9 @@ void OMarkableTreeListBox::CheckButtonHdl() pEntry = NextSelected(pEntry); } CheckButtons(); + + if (m_aCheckButtonHandler.IsSet()) + m_aCheckButtonHandler.Call(this); } //------------------------------------------------------------------------ SvLBoxEntry* OMarkableTreeListBox::GetEntryPosByName(const String& aName,SvLBoxEntry* pStart) const @@ -252,6 +276,9 @@ SvLBoxEntry* OMarkableTreeListBox::GetEntryPosByName(const String& aName,SvLBoxE /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.1 2000/10/05 10:00:43 fs + * initial checkin + * * * Revision 1.0 28.09.00 13:22:30 fs ************************************************************************/ |