[gnome-themes-standard] adwaita: theme the treeview to make it more like mockups
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] adwaita: theme the treeview to make it more like mockups
- Date: Mon, 7 Mar 2011 06:08:56 +0000 (UTC)
commit e7153e9296b40c33f366f7d1363ad228e253323c
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 7 00:58:15 2011 -0500
adwaita: theme the treeview to make it more like mockups
We're not completely there yet but this changes
- expander's shape
- selection colors
src/adwaita_engine.c | 14 ++++---
themes/Adwaita/gtk-3.0/gtk.css | 91 ++++++++++++++++++++++------------------
2 files changed, 58 insertions(+), 47 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 2436f3a..305fd4d 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -1015,6 +1015,7 @@ adwaita_engine_render_expander (GtkThemingEngine *engine,
y += ((int) height / 2) - (side / 2);
state = gtk_theming_engine_get_state (engine);
+
gtk_theming_engine_get_border_color (engine, state, &border);
gtk_theming_engine_get_background_color (engine, state, &bg);
gtk_theming_engine_get_color (engine, state, &fg);
@@ -1023,23 +1024,24 @@ adwaita_engine_render_expander (GtkThemingEngine *engine,
cairo_set_line_width (cr, 1);
- _cairo_round_rectangle (cr, x + 0.5, y + 0.5, side, side, 3);
+ _cairo_round_rectangle (cr, x + 0.5, y + 0.5, side, side, 2);
gdk_cairo_set_source_rgba (cr, &bg);
cairo_fill_preserve (cr);
gdk_cairo_set_source_rgba (cr, &border);
cairo_stroke (cr);
- cairo_set_line_width (cr, 3);
+ cairo_set_line_width (cr, 1);
+ cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
gdk_cairo_set_source_rgba (cr, &fg);
- cairo_move_to (cr, x + 2, y + side / 2 + 0.5);
- cairo_line_to (cr, x + side - 1, y + side / 2 + 0.5);
+ cairo_move_to (cr, x + 3, y + side / 2 + 0.5);
+ cairo_line_to (cr, x + side - 2, y + side / 2 + 0.5);
if ((state & GTK_STATE_FLAG_ACTIVE) == 0)
{
- cairo_move_to (cr, x + side / 2 + 0.5, y + 2);
- cairo_line_to (cr, x + side / 2 + 0.5, y + side - 1);
+ cairo_move_to (cr, x + side / 2 + 0.5, y + 3);
+ cairo_line_to (cr, x + side / 2 + 0.5, y + side - 2);
}
cairo_stroke (cr);
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 99a44b6..649b463 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -113,11 +113,9 @@
-GtkScrolledWindow-scrollbar-spacing: 0;
-GtkScrolledWindow-scrollbars-within-bevel: 1;
- -GtkTreeView-expander-size: 10;
-GtkToolItemGroup-expander-size: 12;
-GtkExpander-expander-size: 12;
-GtkToolbar-internal-padding: 4; /* ??? */
- -GtkTreeView-vertical-separator: 0; /* ??? */
-GtkMenu-horizontal-padding: 0;
-GtkMenu-vertical-padding: 0;
@@ -319,15 +317,6 @@ GtkCalendar {
border-width: 0;
}
-.cell {
- background-color: @theme_base_color;
- color: @theme_text_color;
-}
-
-.cell:selected {
- background-color: @theme_selected_bg_color;
-}
-
/*****************
* Notebooks and *
* tabs *
@@ -874,17 +863,27 @@ GtkIconView {
background-color: @theme_base_color;
color: @theme_fg_color;
border-radius: 0;
+ border-width: 3;
}
GtkTreeView {
- border-radius: 3;
- border-width: 0;
+ -GtkTreeView-vertical-separator: 0;
+ -GtkTreeView-expander-size: 8;
+
+ -GtkWidget-focus-line-width: 1;
+ -adwaita-focus-border-color: @progressbar_border;
+ -adwaita-focus-border-radius: 0;
}
column-header {
padding: 1 2;
}
+column-header .button {
+ border-width: 0;
+ border-radius: 0;
+}
+
row:hover {
border-width: 0;
}
@@ -896,47 +895,57 @@ row:insensitive {
row:selected:focused {
border-width: 0;
background-image: -gtk-gradient (linear,
- left top,
- left bottom,
- from (@selected_row_bg_color_a),
- color-stop (0.05, @selected_row_bg_color_a),
- color-stop (0.05, @selected_row_bg_color_b),
- to (@selected_row_bg_color_a));
+ left top, left bottom,
+ from (@progressbar_border),
+ color-stop (0.03, @progressbar_border),
+ color-stop (0.04, @theme_selected_bg_color),
+ color-stop (0.97, @theme_selected_bg_color),
+ color-stop (0.98, @progressbar_border),
+ to (@progressbar_border));
+ background-color: @theme_selected_bg_color;
}
row:selected {
border-width: 0;
background-image: -gtk-gradient (linear,
- left top,
- left bottom,
- from (mix (@selected_row_bg_color_a, @theme_bg_color, 0.8)),
- color-stop (0.05, mix (@selected_row_bg_color_a, @theme_bg_color, 0.8)),
- color-stop (0.05, mix (@selected_row_bg_color_b, @theme_bg_color, 0.8)),
- to (mix (@selected_row_bg_color_a, @theme_bg_color, 0.8)));
+ left top, left bottom,
+ from (@theme_selected_bg_color),
+ to (@theme_selected_bg_color));
}
-column-header .button {
- border-width: 0;
- border-radius: 0;
- border-color: shade (@inactive_frame_color, 0.935);
- background-image: -gtk-gradient (linear,
- left top,
- left bottom,
- from (shade (@theme_bg_color, 1.04)),
- to (shade (@theme_bg_color, 0.89)));
+.cell {
+ color: @theme_text_color;
+ padding: 2;
+ border-width: 2;
+}
+
+.cell:selected {
+ background-color: @theme_selected_bg_color;
+}
+
+.expander {
+ border-color: @internal_element_color;
+ color: @internal_element_color;
+ background-color: @theme_base_color;
}
-.expander,
.expander:active {
- border-color: #797b76;
- background-color: shade (@theme_bg_color, 1.035);
- color: shade (@theme_selected_bg_color, 1.02);
+ border-color: @internal_element_color;
+ background-color: @theme_base_color;
+ color: @internal_element_color;
}
.expander:prelight {
- border-color: shade (@inactive_frame_color, 0.425);
- background-color: @internal_element_color;
- color: lighter (@theme_bg_color);
+ background-color: shade (@theme_bg_color, 1.02);
+ color: @internal_element_color;
+ border-color: @internal_element_color;
+}
+
+.expander row:selected,
+.expander row:selected:focused {
+ border-color: #acccee;
+ color: #acccee;
+ background-color: @theme_selected_bg_color;
}
/* Calendars */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]