diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-12-20 18:06:30 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-12-20 18:09:34 +0100 |
commit | 96718f95662b9debf03bcdd3cf87a2dd0621dd0c (patch) | |
tree | 1029eee1368588cc5fe79ac55b7610970b4d0278 /vcl/unx | |
parent | bc53760c3bcb83e8ba4351cfcd1ed3d7349e131d (diff) |
gtk: Use the right padding in the menus, bnc#304620
This is not 100% perfect, it sets even the vertical padding to this
value, but better than hardcoded '1' ;-)
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 985fb155bf94..b09461155ce5 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -403,9 +403,6 @@ void GtkData::initNWF( void ) // draw separate buttons for toolbox dropdown items pSVData->maNWFData.mbToolboxDropDownSeparate = true; - // small extra border around menu items - pSVData->maNWFData.mnMenuFormatExtraBorder = 1; - // draw toolbars in separate lines pSVData->maNWFData.mbDockingAreaSeparateTB = true; @@ -420,6 +417,14 @@ void GtkData::initNWF( void ) for( int i = 0; i < nScreens; i++ ) gWidgetData[i].gNWPixmapCacheList = new NWPixmapCacheList; + // small extra border around menu items + NWEnsureGTKMenu( 0 ); + gint horizontal_padding = 1; + gtk_widget_style_get( gWidgetData[0].gMenuItemMenuWidget, + "horizontal_padding", &horizontal_padding, + (char *)NULL); + pSVData->maNWFData.mnMenuFormatExtraBorder = horizontal_padding; + if( SalGetDesktopEnvironment().equalsAscii( "KDE" ) ) { // #i97196# ensure a widget exists and the style engine was loaded |