summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-03-11 13:21:23 +0000
committerDavid Tardon <dtardon@redhat.com>2016-05-06 06:57:52 +0000
commitd80e87a91f25f78239d36ab4a4550173e8d6184b (patch)
tree27f9be50992f57c2e468b05f7e173fecad60ae86 /vcl
parentc927b6692257e427d622add6324fc1c55fce9aa3 (diff)
gtk3: various bits means different things again
so active tabs don't look active without this on recent gtks (cherry picked from commit 235411c9d47ecba88e46d859ea93bcecefb0c46e) Change-Id: Iafa1e65fb0cc096513cdfe12a09fb0ef4c4d2db0 Reviewed-on: https://gerrit.libreoffice.org/24651 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 31758c810a6d..c1117fef3ad5 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1119,6 +1119,12 @@ static GtkStyleContext* createStyleContext(GtkControlPart ePart, GtkStyleContext
# define CHECKED GTK_STATE_FLAG_ACTIVE
#endif
+#if GTK_CHECK_VERSION(3,19,11)
+# define ACTIVE_TAB GTK_STATE_FLAG_CHECKED
+#else
+# define ACTIVE_TAB GTK_STATE_FLAG_ACTIVE
+#endif
+
void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context,
const Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu)
{
@@ -1326,7 +1332,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
case CTRL_TAB_ITEM:
context = mpNotebookHeaderTabsTabStyle;
if (nState & ControlState::SELECTED)
- flags = (GtkStateFlags) (flags | GTK_STATE_FLAG_ACTIVE);
+ flags = (GtkStateFlags) (flags | ACTIVE_TAB);
break;
case CTRL_WINDOW_BACKGROUND:
context = gtk_widget_get_style_context(mpWindow);
@@ -2020,7 +2026,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aTextColor = getColor( text_color );
aStyleSet.SetTabRolloverTextColor(aTextColor);
- gtk_style_context_set_state(pCStyle, GTK_STATE_FLAG_ACTIVE);
+ gtk_style_context_set_state(pCStyle, ACTIVE_TAB);
gtk_style_context_get_color(pCStyle, gtk_style_context_get_state(pCStyle), &text_color);
aTextColor = getColor( text_color );
aStyleSet.SetTabHighlightTextColor(aTextColor);