diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | data/gtkrc | 64 | ||||
-rw-r--r-- | src/sato-draw.c | 20 |
4 files changed, 57 insertions, 41 deletions
@@ -1,3 +1,13 @@ +2007-04-12 Thomas Wood <thomas@openedhand.com> + + * Makefile.am: + * data/gtkrc: + * src/sato-draw.c: (sato_gradient), (sato_draw_box), + (sato_draw_check), (sato_realise): + + - Add shading routine from gtk+ + - Remove hard coded engine colours + 2007-04-12 Jorn Baayen <jorn@openedhand.com> A data/titlebar-panel-applet-background.png: diff --git a/Makefile.am b/Makefile.am index 07ddec7..a3fff7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,9 @@ libsato_engine_la_SOURCES = \ ./src/sato-draw.h \ ./src/sato-main.c \ ./src/sato-style.c \ - ./src/sato-style.h + ./src/sato-style.h \ + ./src/sato-utils.c \ + ./src/sato-utils.h libsato_engine_la_LDFLAGS = -module -avoid-version -no-undefined libsato_engine_la_LIBADD = $(GTK_LIBS) @@ -1,3 +1,10 @@ +# Sato GTK+ theme + +# Colours: +# green: 72d115 +# dark gray: cbccc9 +# light gray: eeeeec + gtk_button_images = 0 gtk_menu_images = 0 @@ -25,13 +32,13 @@ style "default" fg [PRELIGHT] = "#555753" fg [ACTIVE] = "#555753" fg [INSENSITIVE] = "#555753" - fg [SELECTED] = "#73d216" + fg [SELECTED] = "white" - bg [NORMAL] = "#EEEEEC" - bg [PRELIGHT] = "#FFFFFF" - bg [ACTIVE] = "#FFFFFF" - bg [INSENSITIVE] = "#FFFFFF" - bg [SELECTED] = "#70cf14" + bg [NORMAL] = "#eeeeec" + bg [PRELIGHT] = "#eeeeec" + bg [ACTIVE] = "#72d115" + bg [INSENSITIVE] = "#eeeeec" + bg [SELECTED] = "#72d115" text [NORMAL] = "#555753" text [PRELIGHT] = "#555753" @@ -45,33 +52,6 @@ style "default" class "GtkWidget" style "default" -style "button" -{ - - fg [NORMAL] = "#fff" - fg [PRELIGHT] = "#fff" - fg [ACTIVE] = "#fff" - fg [INSENSITIVE] = "#555753" - fg [SELECTED] = "#FFFFFF" - - bg [NORMAL] = "#73d216" - bg [PRELIGHT] = "#73d216" - bg [ACTIVE] = "#73d216" - bg [INSENSITIVE] = "#73d216" - - engine "sato-engine" - { - # something like this would be cool... - #gradient = 1 - #start_color = "#73d216" - #end_color = "#4e9a06" - - #border_color = "#555753" - } -} - -widget_class "*GtkButton*" style "button" -widget "*GtkToggleButton*" style "button" style "menubar" { @@ -80,6 +60,24 @@ style "menubar" widget_class "*GtkMenuBar" style "menubar" +style "scrollbar" +{ + bg[NORMAL] = "#72d115" + bg[PRELIGHT] = "#72d115" + bg[ACTIVE] = "#73d216" +} +class "GtkScrollbar" style "scrollbar" + +style "button" +{ + bg[NORMAL] = "#72d115" + bg[PRELIGHT] = "#72d115" + bg[ACTIVE] = "#72d115" +} +widget_class "*GtkButton*" style "button" +widget_class "*GtkComboBox*" style "button" +class "GtkMenuItem" style "button" + # # Panel # diff --git a/src/sato-draw.c b/src/sato-draw.c index 0a07a3e..686b05d 100644 --- a/src/sato-draw.c +++ b/src/sato-draw.c @@ -158,13 +158,17 @@ sato_gradient (GtkStyle * style, GdkWindow * window, GtkStateType state_type, /* get the start and end colours */ if (state_type == GTK_STATE_ACTIVE) { - gdk_color_parse ("#73d216", &end_color); - gdk_color_parse ("#4e9a06", &start_color); + sato_shade_colour (&style->bg[state_type], &start_color, 0.9); + sato_shade_colour (&style->bg[state_type], &end_color, 1.1); + // gdk_color_parse ("#73d216", &end_color); + // gdk_color_parse ("#4e9a06", &start_color); } else { - gdk_color_parse ("#73d216", &start_color); - gdk_color_parse ("#4e9a06", &end_color); + sato_shade_colour (&style->bg[state_type], &start_color, 1.1); + sato_shade_colour (&style->bg[state_type], &end_color, 0.9); + // gdk_color_parse ("#73d216", &start_color); + // gdk_color_parse ("#4e9a06", &end_color); } /* set line for 1px */ @@ -218,9 +222,9 @@ sato_draw_box (DRAW_ARGS) { GdkGC *gc; if (widget && GTK_WIDGET_HAS_FOCUS (widget)) - gc = style->base_gc [GTK_STATE_SELECTED]; + gc = style->bg_gc [GTK_STATE_SELECTED]; else - gc = style->text_gc[state_type]; + gc = style->fg_gc[state_type]; sato_rounded_rectangle (window, gc, x, y, width, height); } @@ -281,7 +285,7 @@ sato_draw_check (GtkStyle * style, GdkWindow * window, gc = style->text_gc[state_type]; if (shadow_type == GTK_SHADOW_IN) - gdk_draw_rectangle (window, style->fg_gc[GTK_STATE_SELECTED], TRUE, x + 5, y + 5, width - 10, height - 10); + gdk_draw_rectangle (window, style->base_gc[GTK_STATE_SELECTED], TRUE, x + 5, y + 5, width - 10, height - 10); sato_rounded_rectangle (window, gc, x, y, width, height); } @@ -494,6 +498,8 @@ sato_realise (GtkStyle * style) GDK_CAP_BUTT, GDK_JOIN_MITER); gdk_gc_set_line_attributes (style->base_gc[i], 2, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER); + gdk_gc_set_line_attributes (style->dark_gc[i], 2, GDK_LINE_SOLID, + GDK_CAP_BUTT, GDK_JOIN_MITER); } gdk_gc_set_line_attributes (style->white_gc, 2, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER); |