[gnome-themes-standard: 10/26] adwaita: use the separator class and render tool separators entirely from CSS
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard: 10/26] adwaita: use the separator class and render tool separators entirely from CSS
- Date: Fri, 4 Mar 2011 03:31:40 +0000 (UTC)
commit 3efa5fcaef82024e467890a70a8c177006ce8b25
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Mar 2 20:01:28 2011 -0500
adwaita: use the separator class and render tool separators entirely from CSS
src/adwaita_engine.c | 55 ----------------------------------------
themes/Adwaita/gtk-3.0/gtk.css | 16 ++++++------
2 files changed, 8 insertions(+), 63 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 2b75ca4..417acd1 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -389,60 +389,6 @@ adwaita_engine_render_check (GtkThemingEngine *engine,
}
static void
-adwaita_engine_render_line (GtkThemingEngine *engine,
- cairo_t *cr,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1)
-{
- GdkRGBA bg_color;
- gdouble angle;
- const GtkWidgetPath *path;
- GtkStateFlags flags;
- gint len;
-
- path = gtk_theming_engine_get_path (engine);
- flags = gtk_theming_engine_get_state (engine);
-
- if (!(gtk_widget_path_is_type (path, GTK_TYPE_SEPARATOR_TOOL_ITEM) &&
- gtk_widget_path_has_parent (path, GTK_TYPE_TOOLBAR)))
- {
- GTK_THEMING_ENGINE_CLASS (adwaita_engine_parent_class)->render_line (engine,
- cr,
- x0, y0,
- x1, y1);
- return;
- }
-
- gtk_theming_engine_get_background_color (engine, flags, &bg_color);
-
- cairo_save (cr);
-
- angle = atan2 (x1 - x0, y1 - y0);
- angle = (2 * G_PI) - angle;
- angle += G_PI / 2;
-
- cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
- cairo_set_line_width (cr, 1.0);
-
- cairo_translate (cr, x0, y0);
- cairo_rotate (cr, angle);
-
- x1 -= x0;
- y1 -= y0;
-
- len = (gint) sqrt ((x1 * x1) + (y1 * y1));
-
- gdk_cairo_set_source_rgba (cr, &bg_color);
- cairo_move_to (cr, 0, -0.5);
- cairo_line_to (cr, len, -0.5);
- cairo_stroke (cr);
-
- cairo_restore (cr);
-}
-
-static void
render_radio_menuitem (GtkThemingEngine *engine,
cairo_t *cr,
gdouble x,
@@ -1149,7 +1095,6 @@ adwaita_engine_class_init (AdwaitaEngineClass *klass)
engine_class->render_arrow = adwaita_engine_render_arrow;
engine_class->render_focus = adwaita_engine_render_focus;
engine_class->render_check = adwaita_engine_render_check;
- engine_class->render_line = adwaita_engine_render_line;
engine_class->render_option = adwaita_engine_render_option;
engine_class->render_extension = adwaita_engine_render_extension;
engine_class->render_frame = adwaita_engine_render_frame;
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 3fd8bf5..a3b20ec 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -641,16 +641,16 @@ GtkWindow > GtkVBox > GtkToolbar .button:active:prelight {
to (alpha (shade (@toolbar_gradient_base, 1.14), 0.0)));
}
-GtkWindow > GtkVBox > GtkVBox > EggEditableToolbar > GtkHBox > GtkToolbar > GtkSeparatorToolItem,
-GtkWindow > GtkVBox > GtkToolbar > GtkSeparatorToolItem {
- background-color: shade (@theme_bg_color, 0.56);
+GtkWindow > GtkVBox > GtkVBox > EggEditableToolbar > GtkHBox > GtkToolbar .separator,
+GtkWindow > GtkVBox > GtkToolbar .separator {
+ border-style: solid;
+ border-color: shade (@theme_bg_color, 0.56);
+ border-width: 1;
+
background-image: none;
- -GtkWidget-wide-separators: 0;
- padding: 0;
-}
-GtkSeparator {
- -GtkSeparator-shadow-type: none;
+ -GtkWidget-wide-separators: 1;
+ -GtkWidget-separator-width: 1;
}
GtkScrolledWindow.frame {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]