diff --git a/ChangeLog b/ChangeLog index 5a886548a0..09a9224417 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Wed Feb 20 23:00:08 2002 Soeren Sandmann + + * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for + check- and radiobuttons. + + * gtk/theme-bits/check-13-inconsistent.png, + gtk/theme-bits/radio-13-inconsistent.png: new files + + * gtk/theme-bits/radio-13.png: new radio buttons + + * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new + -inconsistent.png files + Wed Feb 20 16:19:49 2002 Owen Taylor * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5a886548a0..09a9224417 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,16 @@ +Wed Feb 20 23:00:08 2002 Soeren Sandmann + + * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for + check- and radiobuttons. + + * gtk/theme-bits/check-13-inconsistent.png, + gtk/theme-bits/radio-13-inconsistent.png: new files + + * gtk/theme-bits/radio-13.png: new radio buttons + + * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new + -inconsistent.png files + Wed Feb 20 16:19:49 2002 Owen Taylor * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5a886548a0..09a9224417 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,16 @@ +Wed Feb 20 23:00:08 2002 Soeren Sandmann + + * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for + check- and radiobuttons. + + * gtk/theme-bits/check-13-inconsistent.png, + gtk/theme-bits/radio-13-inconsistent.png: new files + + * gtk/theme-bits/radio-13.png: new radio buttons + + * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new + -inconsistent.png files + Wed Feb 20 16:19:49 2002 Owen Taylor * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5a886548a0..09a9224417 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,16 @@ +Wed Feb 20 23:00:08 2002 Soeren Sandmann + + * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for + check- and radiobuttons. + + * gtk/theme-bits/check-13-inconsistent.png, + gtk/theme-bits/radio-13-inconsistent.png: new files + + * gtk/theme-bits/radio-13.png: new radio buttons + + * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new + -inconsistent.png files + Wed Feb 20 16:19:49 2002 Owen Taylor * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5a886548a0..09a9224417 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,16 @@ +Wed Feb 20 23:00:08 2002 Soeren Sandmann + + * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for + check- and radiobuttons. + + * gtk/theme-bits/check-13-inconsistent.png, + gtk/theme-bits/radio-13-inconsistent.png: new files + + * gtk/theme-bits/radio-13.png: new radio buttons + + * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new + -inconsistent.png files + Wed Feb 20 16:19:49 2002 Owen Taylor * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5a886548a0..09a9224417 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,16 @@ +Wed Feb 20 23:00:08 2002 Soeren Sandmann + + * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for + check- and radiobuttons. + + * gtk/theme-bits/check-13-inconsistent.png, + gtk/theme-bits/radio-13-inconsistent.png: new files + + * gtk/theme-bits/radio-13.png: new radio buttons + + * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new + -inconsistent.png files + Wed Feb 20 16:19:49 2002 Owen Taylor * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5a886548a0..09a9224417 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,16 @@ +Wed Feb 20 23:00:08 2002 Soeren Sandmann + + * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for + check- and radiobuttons. + + * gtk/theme-bits/check-13-inconsistent.png, + gtk/theme-bits/radio-13-inconsistent.png: new files + + * gtk/theme-bits/radio-13.png: new radio buttons + + * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new + -inconsistent.png files + Wed Feb 20 16:19:49 2002 Owen Taylor * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index fa81482e65..8b190d697d 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -330,53 +330,86 @@ typedef enum { CHECK_LIGHT, CHECK_MID, CHECK_TEXT, + CHECK_INCONSISTENT_AA, + CHECK_INCONSISTENT_TEXT, RADIO_BASE, RADIO_BLACK, RADIO_DARK, RADIO_LIGHT, RADIO_MID, - RADIO_TEXT + RADIO_TEXT, + RADIO_INCONSISTENT_AA, + RADIO_INCONSISTENT_TEXT } IndicatorPart; -static char check_aa_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x58,0x00,0xa0, - 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; -static char check_base_bits[] = { - 0x00,0x00,0x00,0x00,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc, - 0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0x00,0x00,0x00,0x00}; +/* + * Extracted from check-13.png, width=13, height=13 + */ static char check_black_bits[] = { - 0x00,0x00,0xfe,0x0f,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02, - 0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00}; + 0x00,0x00,0xfe,0x0f,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02, + 0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00}; static char check_dark_bits[] = { - 0xff,0x1f,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, - 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00}; -static char check_light_bits[] = { - 0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00, - 0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0xfe,0x1f}; + 0xff,0x1f,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, + 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00}; static char check_mid_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00, - 0x08,0x00,0x08,0x00,0x08,0x00,0x08,0xfc,0x0f,0x00,0x00}; + 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00, + 0x08,0x00,0x08,0x00,0x08,0x00,0x08,0xfc,0x0f,0x00,0x00,0x00,0x00}; +static char check_light_bits[] = { + 0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00, + 0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0xfe,0x1f,0x00,0x00}; static char check_text_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x03,0x80,0x01,0x80,0x00,0xd8, - 0x00,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; -static char radio_base_bits[] = { - 0x00,0x00,0x00,0x00,0xf0,0x01,0xf8,0x03,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc, - 0x07,0xfc,0x07,0xf8,0x03,0xf0,0x01,0x00,0x00,0x00,0x00}; + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x03,0x80,0x01,0x80,0x00,0x58, + 0x00,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +static char check_aa_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x58,0x00,0xa0, + 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +static char check_base_bits[] = { + 0x00,0x00,0x00,0x00,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc, + 0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0x00,0x00,0x00,0x00,0x00,0x00}; + +/* + * Extracted from check-13-inconsistent-ssp.png, width=13, height=13 + */ +static char check_inconsistent_text_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x03,0xf8, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +static char check_inconsistent_aa_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + +/* + * Extracted from radio-13-ssp.png, width=13, height=13 + */ static char radio_black_bits[] = { - 0x00,0x00,0xf0,0x01,0x08,0x02,0x04,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02, - 0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + 0x00,0x00,0xf0,0x01,0x0c,0x02,0x04,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02, + 0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; static char radio_dark_bits[] = { - 0xf0,0x01,0x08,0x02,0x04,0x04,0x02,0x04,0x01,0x00,0x01,0x00,0x01,0x00,0x01, - 0x00,0x01,0x00,0x02,0x00,0x0c,0x00,0x00,0x00,0x00,0x00}; -static char radio_light_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,0x10,0x00,0x10,0x00, - 0x10,0x00,0x10,0x00,0x08,0x00,0x04,0x08,0x02,0xf0,0x01}; + 0xf0,0x00,0x0c,0x02,0x02,0x04,0x02,0x04,0x01,0x08,0x01,0x08,0x01,0x08,0x01, + 0x08,0x00,0x04,0x02,0x04,0x0c,0x03,0xf0,0x00,0x00,0x00,0x00,0x00}; static char radio_mid_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00, - 0x08,0x00,0x08,0x00,0x04,0x00,0x02,0xf0,0x01,0x00,0x00}; + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +static char radio_light_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00, + 0x10,0x00,0x08,0x00,0x08,0x00,0x04,0x00,0x03,0xf0,0x00,0x00,0x00}; static char radio_text_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xf0,0x01,0xf0,0x01,0xf0, - 0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xf0,0x01,0xf0,0x01,0xf0, + 0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +static char radio_aa_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +static char radio_base_bits[] = { + 0x00,0x00,0x00,0x00,0xf0,0x01,0xf8,0x03,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc, + 0x07,0xfc,0x03,0xf8,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +/* + * Extracted from radio-13-inconsistent-ssp.png, width=13, height=13 + */ +static char radio_inconsistent_text_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +static char radio_inconsistent_aa_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x03,0x00,0x00,0xf8, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; static struct { char *bits; @@ -389,12 +422,16 @@ static struct { { check_light_bits, NULL }, { check_mid_bits, NULL }, { check_text_bits, NULL }, + { check_inconsistent_aa_bits, NULL }, + { check_inconsistent_text_bits, NULL }, { radio_base_bits, NULL }, { radio_black_bits, NULL }, { radio_dark_bits, NULL }, { radio_light_bits, NULL }, { radio_mid_bits, NULL }, - { radio_text_bits, NULL } + { radio_text_bits, NULL }, + { radio_inconsistent_aa_bits, NULL }, + { radio_inconsistent_text_bits, NULL }, }; /* --- variables --- */ @@ -3301,20 +3338,35 @@ gtk_default_draw_check (GtkStyle *style, draw_part (window, style->black_gc, area, x, y, CHECK_TEXT); draw_part (window, style->dark_gc[state_type], area, x, y, CHECK_AA); } + else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */ + { + draw_part (window, style->black_gc, area, x, y, CHECK_INCONSISTENT_TEXT); + draw_part (window, style->dark_gc[state_type], area, x, y, CHECK_INCONSISTENT_AA); + } } else { + GdkGC *base_gc = style->base_gc[state_type]; + + if (state_type == GTK_STATE_ACTIVE) + base_gc = style->bg_gc[state_type]; + + draw_part (window, base_gc, area, x, y, CHECK_BASE); draw_part (window, style->black_gc, area, x, y, CHECK_BLACK); draw_part (window, style->dark_gc[state_type], area, x, y, CHECK_DARK); draw_part (window, style->mid_gc[state_type], area, x, y, CHECK_MID); draw_part (window, style->light_gc[state_type], area, x, y, CHECK_LIGHT); - draw_part (window, style->base_gc[state_type], area, x, y, CHECK_BASE); if (shadow_type == GTK_SHADOW_IN) { draw_part (window, style->text_gc[state_type], area, x, y, CHECK_TEXT); draw_part (window, style->text_aa_gc[state_type], area, x, y, CHECK_AA); } + else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */ + { + draw_part (window, style->text_gc[state_type], area, x, y, CHECK_INCONSISTENT_TEXT); + draw_part (window, style->text_aa_gc[state_type], area, x, y, CHECK_INCONSISTENT_AA); + } } } @@ -3363,18 +3415,37 @@ gtk_default_draw_option (GtkStyle *style, if (strcmp (detail, "option") == 0) /* Menu item */ { if (shadow_type == GTK_SHADOW_IN) - draw_part (window, style->fg_gc[state_type], area, x, y, RADIO_TEXT); + { + draw_part (window, style->fg_gc[state_type], area, x, y, RADIO_TEXT); + } + else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */ + { + draw_part (window, style->black_gc, area, x, y, CHECK_INCONSISTENT_TEXT); + draw_part (window, style->dark_gc[state_type], area, x, y, CHECK_INCONSISTENT_AA); + } } else { + GdkGC *base_gc = style->base_gc[state_type]; + + if (state_type == GTK_STATE_ACTIVE) + base_gc = style->bg_gc[state_type]; + + draw_part (window, base_gc, area, x, y, RADIO_BASE); draw_part (window, style->black_gc, area, x, y, RADIO_BLACK); draw_part (window, style->dark_gc[state_type], area, x, y, RADIO_DARK); draw_part (window, style->mid_gc[state_type], area, x, y, RADIO_MID); draw_part (window, style->light_gc[state_type], area, x, y, RADIO_LIGHT); - draw_part (window, style->base_gc[state_type], area, x, y, RADIO_BASE); if (shadow_type == GTK_SHADOW_IN) - draw_part (window, style->text_gc[state_type], area, x, y, RADIO_TEXT); + { + draw_part (window, style->text_gc[state_type], area, x, y, RADIO_TEXT); + } + else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */ + { + draw_part (window, style->text_aa_gc[state_type], area, x, y, RADIO_INCONSISTENT_AA); + draw_part (window, style->text_gc[state_type], area, x, y, RADIO_INCONSISTENT_TEXT); + } } } } diff --git a/gtk/theme-bits/Makefile.am b/gtk/theme-bits/Makefile.am index 47cd0b023b..05b7cdd31f 100644 --- a/gtk/theme-bits/Makefile.am +++ b/gtk/theme-bits/Makefile.am @@ -8,4 +8,4 @@ noinst_PROGRAMS = decompose-bits decompose_bits_SOURCES = decompose-bits.c decompose_bits_LDADD = $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la -EXTRA_DIST = check-13.png radio-13.png +EXTRA_DIST = check-13.png check-13-inconsistent radio-13.png radio-13-inconsistent diff --git a/gtk/theme-bits/check-13-inconsistent.png b/gtk/theme-bits/check-13-inconsistent.png new file mode 100644 index 0000000000..3b27dc5a1a Binary files /dev/null and b/gtk/theme-bits/check-13-inconsistent.png differ diff --git a/gtk/theme-bits/radio-13-inconsistent.png b/gtk/theme-bits/radio-13-inconsistent.png new file mode 100644 index 0000000000..b049432b51 Binary files /dev/null and b/gtk/theme-bits/radio-13-inconsistent.png differ diff --git a/gtk/theme-bits/radio-13.png b/gtk/theme-bits/radio-13.png index 410fd50a1e..710f87e16b 100644 Binary files a/gtk/theme-bits/radio-13.png and b/gtk/theme-bits/radio-13.png differ