diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-12-03 17:27:14 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-12-03 17:40:14 +0400 |
commit | 9ea7b2053eea6cf9e97f4846d97f741eed426033 (patch) | |
tree | d0c4f52fd1fc84c6a43526345b26dcd2f19553d3 | |
parent | 21e3eed67ee8f70bf816b389d4680abc3afa160a (diff) |
fdo#45651: fix drop down listbox text color with dark gtk theme
Change-Id: I9ba0b27924d1698bad2c34da75fff57f75a737f0
-rw-r--r-- | vcl/inc/svdata.hxx | 3 | ||||
-rw-r--r-- | vcl/source/control/ilstbox.cxx | 16 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 2 |
3 files changed, 18 insertions, 3 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 974a67fc24eb..f7dcbd674782 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -295,6 +295,9 @@ struct ImplSVNWFData // window background before drawing the native // checkbox bool mbCanDrawWidgetAnySize:1; // set to true currently on gtk + + /// entire drop down listbox resembles a button, no textarea/button parts (as currently on Windows) + bool mbDDListBoxNoTextArea:1; }; diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 34fd3fb053bb..e7bbca69e5c1 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2918,10 +2918,20 @@ void ImplWin::ImplDraw( bool bLayout ) else { Color aColor; - if( bNativeOK && (nState & CTRL_STATE_ROLLOVER) ) - aColor = rStyleSettings.GetFieldRolloverTextColor(); + if( ImplGetSVData()->maNWFData.mbDDListBoxNoTextArea ) + { + if( bNativeOK && (nState & CTRL_STATE_ROLLOVER) ) + aColor = rStyleSettings.GetButtonRolloverTextColor(); + else + aColor = rStyleSettings.GetButtonTextColor(); + } else - aColor = rStyleSettings.GetFieldTextColor(); + { + if( bNativeOK && (nState & CTRL_STATE_ROLLOVER) ) + aColor = rStyleSettings.GetFieldRolloverTextColor(); + else + aColor = rStyleSettings.GetFieldTextColor(); + } if( IsControlForeground() ) aColor = GetControlForeground(); SetTextColor( aColor ); diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 839750d79ebd..46a4c01e49f7 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -428,6 +428,8 @@ void GtkData::initNWF( void ) // omit GetNativeControl while painting (see brdwin.cxx) pSVData->maNWFData.mbCanDrawWidgetAnySize = true; + pSVData->maNWFData.mbDDListBoxNoTextArea = true; + int nScreens = GetGtkSalData()->GetGtkDisplay()->GetXScreenCount(); gWidgetData = WidgetDataVector( nScreens ); for( int i = 0; i < nScreens; i++ ) |