1104 QRect buttonRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); |
1104 QRect buttonRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); |
1105 gtkPainter.setClipRect(option->rect); |
1105 gtkPainter.setClipRect(option->rect); |
1106 // ### Note: Ubuntulooks breaks when the proper widget is passed |
1106 // ### Note: Ubuntulooks breaks when the proper widget is passed |
1107 // Murrine engine requires a widget not to get RGBA check - warnings |
1107 // Murrine engine requires a widget not to get RGBA check - warnings |
1108 GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); |
1108 GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); |
1109 gtkPainter.paintOption(gtkCheckButton , buttonRect, state, shadow, gtkRadioButton->style, QLS("radiobutton")); |
1109 QString key(QLS("radiobutton")); |
1110 |
1110 if (option->state & State_HasFocus) { // Themes such as Nodoka check this flag |
|
1111 key += QLatin1Char('f'); |
|
1112 GTK_WIDGET_SET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); |
|
1113 } |
|
1114 gtkPainter.paintOption(gtkCheckButton , buttonRect, state, shadow, gtkRadioButton->style, key); |
|
1115 if (option->state & State_HasFocus) |
|
1116 GTK_WIDGET_UNSET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); |
1111 } |
1117 } |
1112 break; |
1118 break; |
1113 |
1119 |
1114 case PE_IndicatorCheckBox: { |
1120 case PE_IndicatorCheckBox: { |
1115 GtkShadowType shadow = GTK_SHADOW_OUT; |
1121 GtkShadowType shadow = GTK_SHADOW_OUT; |
1126 shadow = GTK_SHADOW_OUT; |
1132 shadow = GTK_SHADOW_OUT; |
1127 |
1133 |
1128 int spacing; |
1134 int spacing; |
1129 |
1135 |
1130 GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); |
1136 GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); |
|
1137 QString key(QLS("checkbutton")); |
|
1138 if (option->state & State_HasFocus) { // Themes such as Nodoka checks this flag |
|
1139 key += QLatin1Char('f'); |
|
1140 GTK_WIDGET_SET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); |
|
1141 } |
1131 |
1142 |
1132 // Some styles such as aero-clone assume they can paint in the spacing area |
1143 // Some styles such as aero-clone assume they can paint in the spacing area |
1133 gtkPainter.setClipRect(option->rect); |
1144 gtkPainter.setClipRect(option->rect); |
1134 |
1145 |
1135 d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, NULL); |
1146 d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, NULL); |
1136 |
1147 |
1137 QRect checkRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); |
1148 QRect checkRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); |
1138 |
1149 |
1139 gtkPainter.paintCheckbox(gtkCheckButton, checkRect, state, shadow, gtkCheckButton->style, |
1150 gtkPainter.paintCheckbox(gtkCheckButton, checkRect, state, shadow, gtkCheckButton->style, |
1140 QLS("checkbutton")); |
1151 key); |
|
1152 if (option->state & State_HasFocus) |
|
1153 GTK_WIDGET_UNSET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); |
|
1154 |
1141 } |
1155 } |
1142 break; |
1156 break; |
1143 |
1157 |
1144 #ifndef QT_NO_TABBAR |
1158 #ifndef QT_NO_TABBAR |
1145 |
1159 |