Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2007-07-11 14:26:23 (GMT)
committer Benjamin Berg <benjamin@sipsolutions.net>2007-07-11 14:26:23 (GMT)
commit941e9ba5c5b570e3edca244681098501bb32feac (patch)
tree082fc1a8bf1c2dc61ebc9843aa2b34fbc2270b0e /gtk
parentd20feaa6e84976a11b6ec73c7d6fca11e5a05b2d (diff)
Added support for a groupbox widget, and reworked the gtkrc a little bit.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/engine/sugar-style.c3
-rw-r--r--gtk/theme/gtkrc.em91
2 files changed, 81 insertions, 13 deletions
diff --git a/gtk/engine/sugar-style.c b/gtk/engine/sugar-style.c
index e7f91f1..04d1182 100644
--- a/gtk/engine/sugar-style.c
+++ b/gtk/engine/sugar-style.c
@@ -423,6 +423,9 @@ sugar_style_draw_flat_box (GtkStyle *style,
} else if (DETAIL ("radiobutton") || DETAIL ("checkbutton")) {
/* No background drawing for radio and check buttons. */
return;
+ } else if (DETAIL ("groupbox")) {
+ if (state_type == GTK_STATE_NORMAL)
+ state_type = GTK_STATE_INSENSITIVE;
}
parent_class->draw_flat_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
diff --git a/gtk/theme/gtkrc.em b/gtk/theme/gtkrc.em
index 5cc05aa..58598b1 100644
--- a/gtk/theme/gtkrc.em
+++ b/gtk/theme/gtkrc.em
@@ -117,21 +117,86 @@ style "default"
}
}
+
+#############################################################
+# Styles that set default background/foreground colors
+#
+# We almost always need two styles because of the X windows.
+# For example bg[NORMAL] of a window (or eventbox) needs to
+# be set to be the correct window color so that X fills the
+# window correctly from the beginning, and it does not
+# flash in the wrong color.
+#############################################################
+
+style "window"
+{
+ bg[NORMAL] = $panel_grey
+}
+
style "window-child"
{
bg[INSENSITIVE] = $panel_grey
base[INSENSITIVE] = $panel_grey
+
+ fg[NORMAL] = $black
engine "sugar" {
label_fg_color = $black
}
}
-style "window"
+style "palette"
{
- bg[NORMAL] = $panel_grey
+ bg[NORMAL] = $black
+}
+
+style "palette-child"
+{
+ fg[NORMAL] = $white
+}
+
+
+style "groupbox-panel"
+{
+ bg[NORMAL] = $selection_grey
+}
+
+style "groupbox-panel-child"
+{
+ bg[INSENSITIVE] = $selection_grey
+ base[INSENSITIVE] = $selection_grey
+
+ fg[NORMAL] = $white
+
+ engine "sugar" {
+ label_fg_color = $white
+ }
+}
+
+style "groupbox-palette"
+{
+ bg[NORMAL] = $toolbar_grey
}
+style "groupbox-palette-child"
+{
+ bg[INSENSITIVE] = $toolbar_grey
+ base[INSENSITIVE] = $toolbar_grey
+
+ fg[NORMAL] = $white
+
+ engine "sugar" {
+ label_fg_color = $white
+ }
+}
+
+
+
+#########################################################
+#########################################################
+
+
+
style "scrollbar"
{
GtkRange::slider-width = 16 # ?
@@ -313,16 +378,6 @@ style "progressbar"
ythickness = 0
}
-style "palette"
-{
- bg[NORMAL] = $black
-}
-
-style "palette-child"
-{
- fg[NORMAL] = $white
-}
-
style "menu"
{
color["bg_color"] = $black
@@ -383,8 +438,8 @@ class "GtkWidget" style "default"
# This one should probably be the default (ie. no window-child style)
widget_class "<GtkWindow>" style "window"
-widget_class "<GtkWindow>*" style "window-child"
widget_class "<GtkWindow>*<GtkEventBox>" style "window"
+widget_class "<GtkWindow>*" style "window-child"
# SugarToolbox
#widget_class "*<SugarToolbox>" style "toolbox"
@@ -403,6 +458,16 @@ widget_class "*<SugarFrameWindow>*" style "frame"
widget_class "*<SugarPanel>*" style "panel"
+# GroupBoxes (don't set bg[NORMAL] on the widget itself)
+widget_class "<GtkWindow>*<SugarGroupBox>*<GtkEventBox>" style "groupbox-panel"
+widget_class "<GtkWindow>*<SugarGroupBox>*" style "groupbox-panel-child"
+
+widget_class "*<SugarPalette>*<SugarGroupBox>*<GtkEventBox>" style "groupbox-palette"
+widget_class "*<SugarPalette>*<SugarGroupBox>*" style "groupbox-palette-child"
+
+
+
+
####################################################################
# Normal widget styles, using the above things
####################################################################