summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
diff options
context:
space:
mode:
authorspl <simon@raspberrypi.org>2015-07-08 15:26:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-07-09 09:51:28 +0000
commitf1faa887c0c934484fb32a8ec5fbbc9e89f38037 (patch)
treefb5bad6eddd51122b0fe788fbafb6a6e0ca62fb1 /vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
parent969b327c1385daf55484c37957762a336f04e138 (diff)
Gaps at end of menu separator lines read from GTK theme.
Change-Id: I3c42d918680ac989c5cd7cd1022e4a6e7b53aa11 Reviewed-on: https://gerrit.libreoffice.org/16886 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 203ca4c83620..713cbe511afd 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -525,16 +525,21 @@ void GtkData::initNWF()
NWEnsureGTKMenu( SalX11Screen( 0 ) );
gint horizontal_padding = 1;
gint vertical_padding = 1;
+ gint separator_padding = 1;
gtk_widget_style_get( gWidgetData[0].gMenuWidget,
"horizontal-padding", &horizontal_padding,
nullptr);
gtk_widget_style_get( gWidgetData[0].gMenuWidget,
"vertical-padding", &vertical_padding,
nullptr);
+ gtk_widget_style_get( gWidgetData[0].gMenuItemSeparatorMenuWidget,
+ "horizontal-padding", &separator_padding,
+ nullptr);
gint xthickness = gWidgetData[0].gMenuWidget->style->xthickness;
gint ythickness = gWidgetData[0].gMenuWidget->style->ythickness;
pSVData->maNWFData.mnMenuFormatBorderX = xthickness + horizontal_padding;
pSVData->maNWFData.mnMenuFormatBorderY = ythickness + vertical_padding;
+ pSVData->maNWFData.mnMenuSeparatorBorderX = separator_padding;
pSVData->maNWFData.mbCheckBoxNeedsErase = true;
@@ -4527,7 +4532,7 @@ static void NWEnsureGTKMenu( SalX11Screen nScreen )
gWidgetData[nScreen].gMenuItemMenuWidget = gtk_menu_item_new_with_label( "b" );
gWidgetData[nScreen].gMenuItemCheckMenuWidget = gtk_check_menu_item_new_with_label( "b" );
gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( NULL, "b" );
- gWidgetData[nScreen].gMenuItemSeparatorMenuWidget = gtk_menu_item_new();
+ gWidgetData[nScreen].gMenuItemSeparatorMenuWidget = gtk_separator_menu_item_new();
gWidgetData[nScreen].gImageMenuItem = gtk_image_menu_item_new();
g_object_ref_sink (gWidgetData[nScreen].gMenuWidget);