diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-11-04 14:41:01 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-11-04 14:41:01 +0000 |
commit | 66a0a48e0250409901c8ee1eb3c1b0392d3fb5a8 (patch) | |
tree | 409887b8c8e8ab7026797be869deac54f6b9fecb /padmin | |
parent | INTEGRATION: CWS padminhc (1.5.16); FILE MERGED (diff) | |
download | core-66a0a48e0250409901c8ee1eb3c1b0392d3fb5a8.tar.gz core-66a0a48e0250409901c8ee1eb3c1b0392d3fb5a8.zip |
INTEGRATION: CWS padminhc (1.17.10); FILE MERGED
2005/11/01 11:06:07 pl 1.17.10.3: #i48643# no transparent color anymore, use GetDisplayBackground instead of settings
2005/10/31 14:19:19 pl 1.17.10.2: #i48643# forgot a const
2005/10/31 11:48:25 pl 1.17.10.1: #i48643# high contrast images for printer admin
Diffstat (limited to 'padmin')
-rw-r--r-- | padmin/source/padialog.cxx | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx index 0dada3166e87..112ca7c1fc09 100644 --- a/padmin/source/padialog.cxx +++ b/padmin/source/padialog.cxx @@ -4,9 +4,9 @@ * * $RCSfile: padialog.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: kz $ $Date: 2005-10-05 15:03:02 $ + * last change: $Author: kz $ $Date: 2005-11-04 15:41:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -138,15 +138,29 @@ PADialog::PADialog( Window* pParent, BOOL bAdmin ) : m_aDefPrt( PaResId( RID_PA_STR_DEFPRT ) ), m_aRenameStr( PaResId( RID_PA_STR_RENAME ) ), m_pPrinter( 0 ), - m_rPIManager( PrinterInfoManager::get() ), - m_aPrinterImg( Bitmap( PaResId( RID_BMP_SMALL_PRINTER ) ), Color( 0xff, 0x00, 0xff ) ), - m_aFaxImg( Bitmap( PaResId( RID_BMP_SMALL_FAX ) ), Color( 0xff, 0x00, 0xff ) ), - m_aPdfImg( Bitmap( PaResId( RID_BMP_SMALL_PDF ) ), Color( 0xff, 0x00, 0xff ) ) + m_rPIManager( PrinterInfoManager::get() ) { FreeResource(); + updateSettings(); Init(); } +void PADialog::updateSettings() +{ + if( ! GetDisplayBackground().GetColor().IsDark() ) + { + m_aPrinterImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PRINTER ) ) ); + m_aFaxImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_FAX ) ) ); + m_aPdfImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PDF ) ) ); + } + else + { + m_aPrinterImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PRINTER_HC ) ) ); + m_aFaxImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_FAX_HC ) ) ); + m_aPdfImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PDF_HC ) ) ); + } +} + void PADialog::Init() { UpdateDevice(); @@ -191,6 +205,17 @@ long PADialog::Notify( NotifyEvent& rEv ) return ModalDialog::Notify( rEv ); } +void PADialog::DataChanged( const DataChangedEvent& rEv ) +{ + ModalDialog::DataChanged( rEv ); + if( (rEv.GetType() == DATACHANGED_SETTINGS) && + (rEv.GetFlags() & SETTINGS_STYLE) ) + { + updateSettings(); + // push the new images into the listbox + UpdateDevice(); + } +} String PADialog::getSelectedDevice() { |