diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-07-06 08:21:55 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-07-06 08:21:55 +0000 |
commit | ea048a2a183dc3ab22c5912610974ea4fe07632d (patch) | |
tree | e17948a67a7a73649ecc3be1f22bad14fd34616d /vcl | |
parent | c90412c26ef6ec4bdd44bd3053044a50cec16f02 (diff) |
INTEGRATION: CWS vcl41 (1.14.86); FILE MERGED
2005/06/20 15:25:43 pl 1.14.86.1: #i50745# draw highlighted disabled menu entries using generic method
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 663dc4649f28..d8541c84b8a5 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salnativewidgets-gtk.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: obo $ $Date: 2005-04-12 12:19:49 $ + * last change: $Author: obo $ $Date: 2005-07-06 09:21:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2517,6 +2517,11 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu( ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle, OUString aCaption ) { + // #i50745# gtk does not draw disabled menu entries (and crux theme + // even crashes), draw them using vcl functionality. + if( nPart == PART_MENU_ITEM && ! (nState & CTRL_STATE_ENABLED) ) + return FALSE; + GtkStateType stateType; GtkShadowType shadowType; GtkShadowType selected_shadow_type = GTK_SHADOW_OUT; @@ -2576,14 +2581,15 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu( { if( nState & (CTRL_STATE_SELECTED|CTRL_STATE_ROLLOVER) ) { + if( nState & CTRL_STATE_ENABLED ) gtk_paint_box( gMenuItemMenuWidget->style, - gdkDrawable, - GTK_STATE_PRELIGHT, - selected_shadow_type, - &clipRect, - gMenuItemMenuWidget, - "menuitem", - x, y, w, h); + gdkDrawable, + GTK_STATE_PRELIGHT, + selected_shadow_type, + &clipRect, + gMenuItemMenuWidget, + "menuitem", + x, y, w, h); } } } |