gtk-engines r1322 - in trunk: . engines/crux/src engines/thinice/src themes/Crux/gtk-2.0 themes/Industrial/gtk-2.0 themes/Mist/gtk-2.0 themes/Redmond/gtk-2.0 themes/ThinIce/gtk-2.0
- From: bberg svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-engines r1322 - in trunk: . engines/crux/src engines/thinice/src themes/Crux/gtk-2.0 themes/Industrial/gtk-2.0 themes/Mist/gtk-2.0 themes/Redmond/gtk-2.0 themes/ThinIce/gtk-2.0
- Date: Mon, 2 Mar 2009 19:54:52 +0000 (UTC)
Author: bberg
Date: Mon Mar 2 19:54:52 2009
New Revision: 1322
URL: http://svn.gnome.org/viewvc/gtk-engines?rev=1322&view=rev
Log:
2009-03-02 Benjamin Berg <benjamin sipsolutions net>
* engines/crux/src/crux-draw.c: (paint_progress_bar), (draw_box):
* engines/thinice/src/thinice_theme_draw.c:
(thinice_style_draw_box):
* themes/Crux/gtk-2.0/gtkrc:
* themes/Industrial/gtk-2.0/gtkrc:
* themes/Mist/gtk-2.0/gtkrc:
* themes/Redmond/gtk-2.0/gtkrc:
* themes/ThinIce/gtk-2.0/gtkrc:
Some improvements for the progressbar in entries. Things could
certainly be better, but at least this should make it more usable.
Modified:
trunk/ChangeLog
trunk/engines/crux/src/crux-draw.c
trunk/engines/thinice/src/thinice_theme_draw.c
trunk/themes/Crux/gtk-2.0/gtkrc
trunk/themes/Industrial/gtk-2.0/gtkrc
trunk/themes/Mist/gtk-2.0/gtkrc
trunk/themes/Redmond/gtk-2.0/gtkrc
trunk/themes/ThinIce/gtk-2.0/gtkrc
Modified: trunk/engines/crux/src/crux-draw.c
==============================================================================
--- trunk/engines/crux/src/crux-draw.c (original)
+++ trunk/engines/crux/src/crux-draw.c Mon Mar 2 19:54:52 2009
@@ -626,7 +626,7 @@
static void
paint_progress_bar (cairo_t *cr, GtkStyle *style, GtkStateType state_type, GtkProgressBarOrientation orientation,
- gdouble x, gdouble y, gdouble width, gdouble height, gdouble fraction)
+ gdouble x, gdouble y, gdouble width, gdouble height, gdouble fraction, CairoColor *base_color)
{
cairo_pattern_t *crp;
CairoColor c1, c2;
@@ -634,8 +634,8 @@
cairo_rectangle (cr, x, y, width, height);
ge_gdk_color_to_cairo (&style->base[GTK_STATE_SELECTED], &c1);
- CRUX_DARK(c1, c2);
- CRUX_LIGHT(c1, c1);
+ CRUX_DARK(*base_color, c2);
+ CRUX_LIGHT(*base_color, c1);
if (orientation == GTK_PROGRESS_LEFT_TO_RIGHT || orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
crp = cairo_pattern_create_linear (x, y, x, y + height);
else
@@ -1020,9 +1020,10 @@
cairo_line_to (cr, cx, cy + ch);
cairo_stroke (cr);
}
- else if (DETAIL ("bar"))
+ else if (DETAIL ("bar") || DETAIL ("entry-progress"))
{
GtkProgressBarOrientation orientation;
+ CairoColor base_color;
gdouble fraction = 0;
if (widget && GE_IS_PROGRESS_BAR (widget))
{
@@ -1031,7 +1032,13 @@
}
else
orientation = GTK_PROGRESS_LEFT_TO_RIGHT;
- paint_progress_bar (cr, style, state_type, orientation, x, y, width, height, fraction);
+
+ if (DETAIL ("bar"))
+ ge_gdk_color_to_cairo (&style->base[GTK_STATE_SELECTED], &base_color);
+ else
+ ge_gdk_color_to_cairo (&style->bg[state_type], &base_color);
+
+ paint_progress_bar (cr, style, state_type, orientation, x, y, width, height, fraction, &base_color);
}
else if (DETAIL ("trough") && GE_IS_SCALE (widget))
{
Modified: trunk/engines/thinice/src/thinice_theme_draw.c
==============================================================================
--- trunk/engines/thinice/src/thinice_theme_draw.c (original)
+++ trunk/engines/thinice/src/thinice_theme_draw.c Mon Mar 2 19:54:52 2009
@@ -557,6 +557,10 @@
{
draw_border=FALSE;
}
+ else if (CHECK_DETAIL (detail, "entry-progress"))
+ {
+ draw_border=FALSE;
+ }
/***********************************************/
Modified: trunk/themes/Crux/gtk-2.0/gtkrc
==============================================================================
--- trunk/themes/Crux/gtk-2.0/gtkrc (original)
+++ trunk/themes/Crux/gtk-2.0/gtkrc Mon Mar 2 19:54:52 2009
@@ -106,6 +106,9 @@
xthickness = 3
ythickness = 3
+ # Slightly lighter so that the selection will be visible properly
+ bg[SELECTED] = mix(0.85, @selected_bg_color, @base_color)
+
engine "crux-engine"
{
thickness = 3
Modified: trunk/themes/Industrial/gtk-2.0/gtkrc
==============================================================================
--- trunk/themes/Industrial/gtk-2.0/gtkrc (original)
+++ trunk/themes/Industrial/gtk-2.0/gtkrc Mon Mar 2 19:54:52 2009
@@ -29,6 +29,8 @@
GtkButton::child_displacement_x = 0
GtkButton::child_displacement_y = 1
+ GtkEntry::progress-border = { 0, 0, 0, 0 }
+
GtkMenuItem::selected_shadow_type = GTK_SHADOW_IN
GtkRange::activate-slider = 1
@@ -101,6 +103,16 @@
GtkRange::trough-side-details = 1
}
+# Style for the entry progress bar -- ie. change the colors
+style "industrial-entry"
+{
+ xthickness = 2
+ ythickness = 2
+
+ bg[SELECTED] = mix (0.4, @selected_bg_color, @base_color)
+ fg[SELECTED] = @text_color
+}
+
# generic squared buttons style, used for the tasklist (treeview is in the extra treeview style)
style "industrial-squared"
{
@@ -218,7 +230,7 @@
class "GtkMenu" style "industrial-wide"
class "GtkFrame" style "industrial-wide"
class "GtkStatusbar" style "industrial-wide"
-class "GtkEntry" style "industrial-wide"
+class "GtkEntry" style "industrial-entry"
class "GtkEntry" style "industrial-exterior-focus"
class "GtkSpinButton" style "industrial-spinbutton"
Modified: trunk/themes/Mist/gtk-2.0/gtkrc
==============================================================================
--- trunk/themes/Mist/gtk-2.0/gtkrc (original)
+++ trunk/themes/Mist/gtk-2.0/gtkrc Mon Mar 2 19:54:52 2009
@@ -33,6 +33,8 @@
GtkRange::slider_width = 15
GtkRange::stepper_size = 15
+ GtkEntry::progress-border = { 0, 0, 0, 0 }
+
GtkScrollbar::min_slider_length = 15
GtkCheckButton::indicator_size=10
GtkCheckMenuItem::indicator_size=10
@@ -69,9 +71,15 @@
xthickness = 2
}
+style "entry"
+{
+ bg[SELECTED] = mix(0.35, @selected_bg_color, @base_color)
+ fg[SELECTED] = @text_color
+}
+
class "GtkWidget" style "default"
class "GtkMenu" style "menu"
-class "*MenuItem*" style "menuitem"
+class "GtkEntry" style "entry"
widget_class "*<GtkMenuItem>*" style "menuitem"
Modified: trunk/themes/Redmond/gtk-2.0/gtkrc
==============================================================================
--- trunk/themes/Redmond/gtk-2.0/gtkrc (original)
+++ trunk/themes/Redmond/gtk-2.0/gtkrc Mon Mar 2 19:54:52 2009
@@ -107,3 +107,11 @@
fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
}
class "GtkProgressBar" style "standard-progressbar"
+
+
+style "standard-entry"
+{
+ bg[SELECTED] = "#1C40A8"
+ fg[SELECTED] = { 1.0, 1.0, 1.0 }
+}
+class "GtkEntry" style "standard-entry"
Modified: trunk/themes/ThinIce/gtk-2.0/gtkrc
==============================================================================
--- trunk/themes/ThinIce/gtk-2.0/gtkrc (original)
+++ trunk/themes/ThinIce/gtk-2.0/gtkrc Mon Mar 2 19:54:52 2009
@@ -2,6 +2,7 @@
style "default"
{
GtkOptionMenu::indicator_spacing = { 3, 2, 1, 1 }
+ GtkEntry::progress-border = { 1, 1, 1, 1 }
GtkRange::slider_width = 11
GtkRange::stepper_size = 11
GtkScrollbar::min_slider_length = 14
@@ -71,10 +72,16 @@
text[PRELIGHT] = "#FFFFFF"
}
+style "entry" {
+ bg[SELECTED] = "#C9D2F5"
+ fg[SELECTED] = "#000000"
+}
+
class "GtkWidget" style "default"
widget "gtk-tooltip*" style "tooltips"
class "GtkProgressBar" style "progress-bar"
class "*MenuItem*" style "menu-item"
+class "GtkEntry" style "entry"
widget_class "*MenuItem*" style "menu-item"
widget_class "*.GtkAccelMenuItem.*" style "menu-item"
widget_class "*.GtkRadioMenuItem.*" style "menu-item"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]