diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-19 11:07:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-19 11:07:07 +0100 |
commit | ff123fa1086ae0c72c29c9ed4823ef53e6ff7de5 (patch) | |
tree | fc1291a175aa66204928d39d7e27123bccfe1ee6 /vcl/unx | |
parent | d6aa88c48ae3e2076cd1f158d84a08e88c3392c1 (diff) |
gtk3: use correct check menu item style
Change-Id: Iee0c33cba80243b39b6de96cf58b8b274346e522
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index 562016f142a7..e7a9732d1b16 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -33,6 +33,7 @@ GtkStyleContext* GtkSalGraphics::mpMenuBarStyle = NULL; GtkStyleContext* GtkSalGraphics::mpMenuBarItemStyle = NULL; GtkStyleContext* GtkSalGraphics::mpMenuStyle = NULL; GtkStyleContext* GtkSalGraphics::mpMenuItemStyle = NULL; +GtkStyleContext* GtkSalGraphics::mpCheckMenuItemStyle = NULL; GtkStyleContext* GtkSalGraphics::mpSpinStyle = NULL; GtkStyleContext* GtkSalGraphics::mpComboboxStyle = NULL; GtkStyleContext* GtkSalGraphics::mpComboboxButtonStyle = NULL; @@ -824,6 +825,7 @@ static GtkWidget* gFrameIn; static GtkWidget* gFrameOut; static GtkWidget* gMenuBarWidget; static GtkWidget* gMenuItemMenuBarWidget; +static GtkWidget* gCheckMenuItemWidget; static GtkWidget* gTreeViewWidget; bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, @@ -879,7 +881,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co break; case PART_MENU_ITEM_CHECK_MARK: styleClass = GTK_STYLE_CLASS_CHECK; - context = mpMenuItemStyle; + context = mpCheckMenuItemStyle; renderType = RENDER_CHECK; nType = CTRL_CHECKBOX; if (nState & ControlState::PRESSED) @@ -887,7 +889,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co break; case PART_MENU_ITEM_RADIO_MARK: styleClass = GTK_STYLE_CLASS_RADIO; - context = mpMenuItemStyle; + context = mpCheckMenuItemStyle; renderType = RENDER_RADIO; nType = CTRL_RADIOBUTTON; if (nState & ControlState::PRESSED) @@ -1259,7 +1261,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar { indicator_size = 0; - gtk_style_context_get_style( mpMenuItemStyle, + gtk_style_context_get_style( mpCheckMenuItemStyle, "indicator-size", &indicator_size, nullptr ); @@ -2023,6 +2025,11 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow ) gtk_style_context_set_path(mpMenuItemStyle, path); gtk_widget_path_free(path); + gCheckMenuItemWidget = gtk_check_menu_item_new_with_label("M"); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), + gCheckMenuItemWidget); + mpCheckMenuItemStyle = gtk_widget_get_style_context(gCheckMenuItemWidget); + /* Menu bar */ gMenuBarWidget = gtk_menu_bar_new(); gMenuItemMenuBarWidget = gtk_menu_item_new_with_label( "b" ); |