File: 03-checkbox-prelight-text-color-fix

package info (click to toggle)
gtk2-engines-cleanice 2.4.1-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 1,736 kB
  • ctags: 185
  • sloc: sh: 8,965; ansic: 1,369; xml: 332; makefile: 32
file content (23 lines) | stat: -rw-r--r-- 1,104 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: fix text label colors in check buttons in prelight state
 This hack makes the text label colors of check buttons in prelight
 state to be the same as in the normal state. Should be consistent
 with the related hack in draw_flat_box().
Author: Stanislav Maslovski <stanislav.maslovski@gmail.com>
Last-Update: 2010-05-28

--- gtk2-engines-cleanice-2.4.1.orig/src/cleanice-draw.c	2010-05-28 11:09:07.000000000 +0400
+++ gtk2-engines-cleanice-2.4.1/src/cleanice-draw.c	2010-05-28 03:09:31.000000000 +0400
@@ -1279,10 +1279,12 @@
 	 strcmp (g_type_name (GTK_WIDGET_TYPE (widget->parent->parent)),
 		 "GtkExpander") == 0))) &&
       state_type == GTK_STATE_PRELIGHT) {
+    state_type = GTK_STATE_NORMAL;
     if (area) {
       gdk_gc_set_clip_rectangle (style->bg_gc[state_type], area);
     }
-    gdk_draw_layout (window, style->bg_gc[state_type], x, y, layout);
+    gdk_draw_layout_with_colors (window, style->bg_gc[state_type], x, y, layout,
+					&style->fg[state_type], &style->bg[state_type]);
     if (area) {
       gdk_gc_set_clip_rectangle (style->bg_gc[state_type], NULL);
     }