Kaydet (Commit) ccfab82e authored tarafından Caolán McNamara's avatar Caolán McNamara

gtk3: if we have GTK_STATE_FLAG_CHECKED use only that bit

in order to get insensitive checkmarks painted gray

Change-Id: I29016b8c5f08c74934068bb06ae2c76ca2cb01c7
üst 85eb28cc
...@@ -790,9 +790,9 @@ void GtkSalGraphics::PaintCheckOrRadio(GtkStyleContext *context, ...@@ -790,9 +790,9 @@ void GtkSalGraphics::PaintCheckOrRadio(GtkStyleContext *context,
} }
#if GTK_CHECK_VERSION(3,14,0) #if GTK_CHECK_VERSION(3,14,0)
# define CHECKED_AND_ACTIVE (GTK_STATE_FLAG_CHECKED | GTK_STATE_FLAG_ACTIVE) # define CHECKED GTK_STATE_FLAG_CHECKED
#else #else
# define CHECKED_AND_ACTIVE GTK_STATE_FLAG_ACTIVE # define CHECKED GTK_STATE_FLAG_ACTIVE
#endif #endif
bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
...@@ -889,7 +889,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co ...@@ -889,7 +889,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
break; break;
case CTRL_CHECKBOX: case CTRL_CHECKBOX:
flags = (GtkStateFlags)(flags | flags = (GtkStateFlags)(flags |
( (rValue.getTristateVal() == BUTTONVALUE_ON) ? CHECKED_AND_ACTIVE : ( (rValue.getTristateVal() == BUTTONVALUE_ON) ? CHECKED :
(rValue.getTristateVal() == BUTTONVALUE_MIXED) ? GTK_STATE_FLAG_INCONSISTENT : (rValue.getTristateVal() == BUTTONVALUE_MIXED) ? GTK_STATE_FLAG_INCONSISTENT :
GTK_STATE_FLAG_NORMAL)); GTK_STATE_FLAG_NORMAL));
context = mpCheckButtonStyle; context = mpCheckButtonStyle;
...@@ -898,7 +898,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co ...@@ -898,7 +898,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
break; break;
case CTRL_RADIOBUTTON: case CTRL_RADIOBUTTON:
flags = (GtkStateFlags)(flags | flags = (GtkStateFlags)(flags |
( (rValue.getTristateVal() == BUTTONVALUE_ON) ? CHECKED_AND_ACTIVE : GTK_STATE_FLAG_NORMAL)); ( (rValue.getTristateVal() == BUTTONVALUE_ON) ? CHECKED : GTK_STATE_FLAG_NORMAL));
context = mpCheckButtonStyle; context = mpCheckButtonStyle;
styleClass = GTK_STYLE_CLASS_RADIO; styleClass = GTK_STYLE_CLASS_RADIO;
renderType = RENDER_RADIO; renderType = RENDER_RADIO;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment