diff options
author | Ruslan Kabatsayev <b7.10110111@gmail.com> | 2012-05-31 16:59:16 +0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-06-01 12:36:01 +0100 |
commit | 4ba8147f61fadb4e8ae7abc0ad5c9e928edf4baa (patch) | |
tree | 9bb19ce861faa1f618ad2171bde8a0b650066e21 | |
parent | 71daa69351f6903d6a94b7af15fce53361f79c6d (diff) |
Gtk theming: pass tab prelight state to theme
Change-Id: I9b924d83d4da638d17af14a66a618ce7128968e7
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index b86e91f49d4f..e9101bf0c970 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, |