diff options
author | Gary Martin <gary@garycmartin.com> | 2011-03-28 13:18:28 (GMT) |
---|---|---|
committer | Gary Martin <gary@garycmartin.com> | 2011-03-28 13:18:28 (GMT) |
commit | 95aecffced78f4136fa19f008ef97a222a343c2d (patch) | |
tree | 8c7e769828e891e0a00ea4bcf9167226e9d23b76 /gtk | |
parent | 7f212d291abececb011c0698a1edd601246f18c2 (diff) | |
parent | 301298e517bcd51df31d9225bdb1b6d3dd9c84f6 (diff) |
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/engine/Makefile.am | 3 | ||||
-rw-r--r-- | gtk/engine/sugar-style.c | 14 | ||||
-rw-r--r-- | gtk/theme/gtkrc.em | 30 |
3 files changed, 34 insertions, 13 deletions
diff --git a/gtk/engine/Makefile.am b/gtk/engine/Makefile.am index eb720ff..d23508a 100644 --- a/gtk/engine/Makefile.am +++ b/gtk/engine/Makefile.am @@ -1,7 +1,4 @@ INCLUDES = \ - -DGTK_DISABLE_DEPRECATED \ - -DGDK_DISABLE_DEPRECATED \ - -DG_DISABLE_DEPRECATED \ $(ENGINE_CFLAGS) $(WARN_CFLAGS) enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines diff --git a/gtk/engine/sugar-style.c b/gtk/engine/sugar-style.c index 443a708..b81fe69 100644 --- a/gtk/engine/sugar-style.c +++ b/gtk/engine/sugar-style.c @@ -389,8 +389,12 @@ sugar_style_draw_box (GtkStyle *style, SugarInfo info; sugar_fill_generic_info (&info, style, state_type, shadow_type, widget, detail, x, y, width, height); - /* Fill the background with bg_color. */ - sugar_fill_background (cr, &info); + /* Fill the background as it is initilized to base[NORMAL]. + * Relevant GTK+ bug: http://bugzilla.gnome.org/show_bug.cgi?id=513471 + * The fill only happens if no hint has been added by some application + * that is faking GTK+ widgets. */ + if (!widget || !g_object_get_data(G_OBJECT (widget), "transparent-bg-hint")) + sugar_fill_background (cr, &info); info.cont_edges = info.ltr ? EDGE_LEFT : EDGE_RIGHT; sugar_remove_corners (&info.corners, info.cont_edges); @@ -444,7 +448,8 @@ sugar_style_draw_box (GtkStyle *style, info.state = GTK_STATE_INSENSITIVE; /* Needed because the trough and bar are cached in a buffer inside GtkProgress. */ - sugar_fill_background (cr, &info); + if (!widget || !g_object_get_data(G_OBJECT (widget), "transparent-bg-hint")) + sugar_fill_background (cr, &info); sugar_draw_progressbar_trough (cr, &info); } } else if (DETAIL ("bar")) { @@ -641,7 +646,8 @@ sugar_style_draw_shadow (GtkStyle *style, } /* Fill the background with bg_color. */ - sugar_fill_background (cr, &info); + if (!widget || !g_object_get_data(G_OBJECT (widget), "transparent-bg-hint")) + sugar_fill_background (cr, &info); sugar_draw_entry (cr, &info); } else { gdouble line_width; diff --git a/gtk/theme/gtkrc.em b/gtk/theme/gtkrc.em index f7b7129..69dccd9 100644 --- a/gtk/theme/gtkrc.em +++ b/gtk/theme/gtkrc.em @@ -131,6 +131,10 @@ style "default" GtkExpander::expander-spacing = 2 # XXX GtkTreeView::expander-size = 24 + + # we have to disable focus border for GtkTreeView, see #1261 + GtkTreeView::interior-focus = 1 + GtkTreeView::focus-line-width = 0 GtkArrow::arrow-size = 1.0 @@ -145,6 +149,11 @@ style "default" GtkButtonBox::child-internal-pad-x = 0 GtkButtonBox::child-internal-pad-y = 0 + # The following line hints to gecko (and possibly other appliations) + # that the entry should be drawn transparently on the canvas. + # Without this, gecko will fill in the background of the entry. + GtkEntry::honors-transparent-bg-hint = 1 + engine "sugar" { line_width = $line_width thick_line_width = $thick_line_width @@ -267,8 +276,8 @@ style "menu" ${# This is just the exact reverse of what is going on inside GTK+ ...} GtkMenu::scroll-arrow-vlength = $(my_floor(subcell_size/0.7 + 2*thickness)) - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 + GtkMenu::horizontal-padding = $thickness + GtkMenu::vertical-padding = $thickness # This means the outline of the submenu overlaps with a palette. # However in the case of two normal menus, they are next to each other. # It is not possible to be smarter about this, because the style comes from @@ -276,12 +285,21 @@ style "menu" GtkMenu::horizontal-offset = 0 GtkMenu::vertical-offset = 0 + xthickness = 0 + ythickness = 0 +} + +style "palette" = "menu" +{ xthickness = $thickness ythickness = $thickness } style "palette-menu" = "menu" { + GtkMenu::horizontal-padding = 0 + GtkMenu::vertical-padding = 0 + xthickness = 0 ythickness = $subcell_size } @@ -755,9 +773,9 @@ widget_class "*<GtkNotebook>.<GtkBox>.<GtkLabel>" style "notebook-tab" # SugarPalette and Menu widget_class "*<GtkMenu>" style "menu" -widget_class "<SugarPalette>" style "menu" -widget_class "<SugarPalette>.*" style "menu-child" -widget_class "<SugarPalette>*<GtkMenu>" style "palette-menu" +widget_class "<SugarPaletteWindow>" style "palette" +widget_class "<SugarPaletteWindow>.*" style "menu-child" +widget_class "<SugarPaletteWindow>*<GtkMenu>" style "palette-menu" widget_class "*<GtkMenuShell>.*" style "menu-child" # SugarFrameWindow @@ -774,7 +792,7 @@ widget_class "<GtkWindow>*<GtkNotebook>*" style "groupbox-panel-child" widget_class "<GtkWindow>*<GtkNotebook>" style "notebook-panel" -widget_class "<SugarPalette>*<SugarGroupBox>*" style "groupbox-palette-child" +widget_class "<SugarPaletteWindow>*<SugarGroupBox>*" style "groupbox-palette-child" # SugarToolbox |