vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
New commits: commit c1a227600d0b16df283162d24f1a31f5c9cee474 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 9 11:22:31 2015 +0000 draw menu items with gtk theme Change-Id: I65f0ec335d4d0008af002857f48f4a6765d44dfd diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index f6b71ee..770e857 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -837,6 +837,11 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co case CTRL_MENU_POPUP: switch(nPart) { + case PART_MENU_ITEM: + styleClass = GTK_STYLE_CLASS_MENUITEM; + context = mpMenuItemStyle; + renderType = RENDER_BACKGROUND_AND_FRAME; + break; case PART_MENU_ITEM_CHECK_MARK: styleClass = GTK_STYLE_CLASS_CHECK; context = mpMenuItemStyle; @@ -1423,7 +1428,7 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP ( (nPart == PART_DRAW_BACKGROUND_HORZ) || (nPart == PART_DRAW_BACKGROUND_VERT) || (nPart == PART_ENTIRE_CONTROL) || (nPart == HAS_THREE_BUTTONS))) || (nType == CTRL_MENU_POPUP && - ( (nPart==PART_ENTIRE_CONTROL) || + ( (nPart == PART_ENTIRE_CONTROL) || (nPart == PART_MENU_ITEM) || (nPart == PART_MENU_ITEM_CHECK_MARK) || (nPart == PART_MENU_ITEM_RADIO_MARK) || (nPart == PART_MENU_SEPARATOR) || (nPart == PART_MENU_SUBMENU_ARROW) )) ) commit a68fb13dffb9db33e63f41c6afdc83a6e6134c6b Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 9 11:23:03 2015 +0000 fix various native themeing issues because of lacking restore Change-Id: Ie91b3fc3090906b321f7b0d3073de129627c0407 diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index c532824..f6b71ee 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -960,6 +960,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co break; } + gtk_style_context_restore(context); cairo_surface_flush(cairo_get_target(cr)); cairo_destroy(cr); // unref mpFrame->damaged(basegfx::B2IBox(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.Right(), rControlRegion.Bottom())); commit d535a78315023dcbe5b5c67a625d79885b210270 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 9 11:00:06 2015 +0000 draw menu bg with gtk theme Change-Id: Ia525130e8c378b784b7ee8439153daa1f2a43283 diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index f294b80..c532824 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -835,7 +835,6 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co } break; case CTRL_MENU_POPUP: - /* FIXME: missing ENTIRE_CONTROL, as it doesn't seem to work */ switch(nPart) { case PART_MENU_ITEM_CHECK_MARK: @@ -857,6 +856,10 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co context = mpMenuStyle; renderType = RENDER_ARROW; break; + case PART_ENTIRE_CONTROL: + context = mpMenuStyle; + renderType = RENDER_BACKGROUND; + break; } break; case CTRL_TOOLBAR: @@ -1419,9 +1422,13 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP ( (nPart == PART_DRAW_BACKGROUND_HORZ) || (nPart == PART_DRAW_BACKGROUND_VERT) || (nPart == PART_ENTIRE_CONTROL) || (nPart == HAS_THREE_BUTTONS))) || (nType == CTRL_MENU_POPUP && - ((nPart == PART_MENU_ITEM_CHECK_MARK) || (nPart == PART_MENU_ITEM_RADIO_MARK) || - (nPart == PART_MENU_SEPARATOR) || (nPart == PART_MENU_SUBMENU_ARROW)))) - return true; + ( (nPart==PART_ENTIRE_CONTROL) || + (nPart == PART_MENU_ITEM_CHECK_MARK) || (nPart == PART_MENU_ITEM_RADIO_MARK) || + (nPart == PART_MENU_SEPARATOR) || (nPart == PART_MENU_SUBMENU_ARROW) )) + ) + { + return true; + } printf( "Unhandled is native supported for Type: %d, Part %d\n", (int)nType, (int)nPart );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits