[Libreoffice-commits] .: vcl/unx
Michael Meeks
michael at kemper.freedesktop.org
Fri Jun 1 04:38:15 PDT 2012
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 4ba8147f61fadb4e8ae7abc0ad5c9e928edf4baa
Author: Ruslan Kabatsayev <b7.10110111 at gmail.com>
Date: Thu May 31 16:59:16 2012 +0400
Gtk theming: pass tab prelight state to theme
Change-Id: I9b924d83d4da638d17af14a66a618ce7128968e7
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index b86e91f..e9101bf 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -46,6 +46,7 @@
#include "vcl/vclenum.hxx"
#include "vcl/fontmanager.hxx"
typedef struct _cairo_font_options cairo_font_options_t;
+const char* const tabPrelitDataName="libreoffice-tab-is-prelit";
// initialize statics
sal_Bool GtkSalGraphics::bThemeChanged = sal_True;
@@ -2461,10 +2462,15 @@ sal_Bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
case CTRL_TAB_ITEM:
stateType = ( nState & CTRL_STATE_SELECTED ) ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE;
+ if( nState & CTRL_STATE_ROLLOVER )
+ g_object_set_data(G_OBJECT(pixmap),tabPrelitDataName,(gpointer)TRUE);
+
gtk_paint_extension( gWidgetData[m_nXScreen].gNotebookWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[m_nXScreen].gNotebookWidget,
(char *)"tab", (tabRect.Left() - pixmapRect.Left()), (tabRect.Top() - pixmapRect.Top()),
tabRect.GetWidth(), tabRect.GetHeight(), GTK_POS_BOTTOM );
+ g_object_steal_data(G_OBJECT(pixmap),tabPrelitDataName);
+
if ( nState & CTRL_STATE_SELECTED )
{
gtk_paint_flat_box( m_pWindow->style, pixmap, stateType, GTK_SHADOW_NONE, NULL, m_pWindow,
More information about the Libreoffice-commits
mailing list