|
|
a8ce992 |
From 235411c9d47ecba88e46d859ea93bcecefb0c46e Mon Sep 17 00:00:00 2001
|
|
|
a8ce992 |
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
|
a8ce992 |
Date: Fri, 11 Mar 2016 13:21:23 +0000
|
|
|
a8ce992 |
Subject: [PATCH] gtk3: various bits means different things again
|
|
|
a8ce992 |
|
|
|
a8ce992 |
Change-Id: Iafa1e65fb0cc096513cdfe12a09fb0ef4c4d2db0
|
|
|
a8ce992 |
---
|
|
|
a8ce992 |
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 10 ++++++++--
|
|
|
a8ce992 |
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
a8ce992 |
|
|
|
a8ce992 |
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
|
|
|
a8ce992 |
index 403280c..7591f68 100644
|
|
|
a8ce992 |
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
|
|
|
a8ce992 |
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
|
|
|
a8ce992 |
@@ -1124,6 +1124,12 @@ static GtkStyleContext* createStyleContext(GtkControlPart ePart, GtkStyleContext
|
|
|
a8ce992 |
# define CHECKED GTK_STATE_FLAG_ACTIVE
|
|
|
a8ce992 |
#endif
|
|
|
a8ce992 |
|
|
|
a8ce992 |
+#if GTK_CHECK_VERSION(3,19,11)
|
|
|
a8ce992 |
+# define ACTIVE_TAB GTK_STATE_FLAG_CHECKED
|
|
|
a8ce992 |
+#else
|
|
|
a8ce992 |
+# define ACTIVE_TAB GTK_STATE_FLAG_ACTIVE
|
|
|
a8ce992 |
+#endif
|
|
|
a8ce992 |
+
|
|
|
a8ce992 |
void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context,
|
|
|
a8ce992 |
const Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu)
|
|
|
a8ce992 |
{
|
|
|
a8ce992 |
@@ -1345,7 +1351,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
|
|
|
a8ce992 |
case CTRL_TAB_ITEM:
|
|
|
a8ce992 |
context = mpNotebookHeaderTabsTabStyle;
|
|
|
a8ce992 |
if (nState & ControlState::SELECTED)
|
|
|
a8ce992 |
- flags = (GtkStateFlags) (flags | GTK_STATE_FLAG_ACTIVE);
|
|
|
a8ce992 |
+ flags = (GtkStateFlags) (flags | ACTIVE_TAB);
|
|
|
a8ce992 |
break;
|
|
|
a8ce992 |
case CTRL_WINDOW_BACKGROUND:
|
|
|
a8ce992 |
context = gtk_widget_get_style_context(mpWindow);
|
|
|
a8ce992 |
@@ -2030,7 +2036,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
|
|
|
a8ce992 |
aTextColor = getColor( text_color );
|
|
|
a8ce992 |
aStyleSet.SetTabRolloverTextColor(aTextColor);
|
|
|
a8ce992 |
|
|
|
a8ce992 |
- gtk_style_context_set_state(pCStyle, GTK_STATE_FLAG_ACTIVE);
|
|
|
a8ce992 |
+ gtk_style_context_set_state(pCStyle, ACTIVE_TAB);
|
|
|
a8ce992 |
gtk_style_context_get_color(pCStyle, gtk_style_context_get_state(pCStyle), &text_color);
|
|
|
a8ce992 |
aTextColor = getColor( text_color );
|
|
|
a8ce992 |
aStyleSet.SetTabHighlightTextColor(aTextColor);
|
|
|
a8ce992 |
--
|
|
|
a8ce992 |
2.7.1
|
|
|
a8ce992 |
|