[gnome-themes-standard] adwaita: make the focus border radius configurable
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] adwaita: make the focus border radius configurable
- Date: Mon, 7 Mar 2011 06:08:51 +0000 (UTC)
commit fc93ff7a8cbea2f1ec13bdfe7fc0ab2e44295f97
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 7 00:56:32 2011 -0500
adwaita: make the focus border radius configurable
src/adwaita_engine.c | 12 ++++++++++--
themes/Adwaita/gtk-3.0/gtk.css | 2 ++
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 0a32b7f..2436f3a 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -141,11 +141,13 @@ adwaita_engine_render_focus (GtkThemingEngine *engine,
cairo_pattern_t *pattern = NULL;
GtkStateFlags state;
gint line_width;
+ gint border_radius;
state = gtk_theming_engine_get_state (engine);
gtk_theming_engine_get (engine, state,
"-adwaita-focus-border-color", &border_color,
"-adwaita-focus-fill-color", &fill_color,
+ "-adwaita-focus-border-radius", &border_radius,
"-adwaita-focus-border-gradient-a", &border_gradient_a,
"-adwaita-focus-border-gradient-b", &border_gradient_b,
NULL);
@@ -159,10 +161,10 @@ adwaita_engine_render_focus (GtkThemingEngine *engine,
if (line_width > 1) {
_cairo_round_rectangle (cr, x, y,
- width, height, 1);
+ width, height, border_radius);
} else {
_cairo_round_rectangle (cr, x + 0.5, y + 0.5,
- width - 1, height - 1, 2);
+ width - 1, height - 1, border_radius);
}
/* if we have a fill color, draw the fill */
@@ -1538,6 +1540,12 @@ adwaita_engine_class_init (AdwaitaEngineClass *klass)
"Focus border color",
GDK_TYPE_RGBA, 0));
gtk_theming_engine_register_property (ADWAITA_NAMESPACE, NULL,
+ g_param_spec_int ("focus-border-radius",
+ "Focus border radius",
+ "Focus border radius",
+ 0, G_MAXINT, 0,
+ 0));
+ gtk_theming_engine_register_property (ADWAITA_NAMESPACE, NULL,
g_param_spec_boxed ("focus-border-gradient-a",
"Focus border gradient A",
"Focus border gradient A",
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index bea2b83..99a44b6 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -146,6 +146,7 @@
-GtkWidget-focus-line-width: 1;
-adwaita-focus-border-color: @keyboard_focus_border_a;
+ -adwaita-focus-border-radius: 2;
-adwaita-focus-fill-color: none;
-adwaita-focus-border-gradient-a: none;
-adwaita-focus-border-gradient-b: none;
@@ -464,6 +465,7 @@ GtkComboBox .button {
-adwaita-focus-fill-color: alpha (@theme_base_color, 0.35);
-adwaita-focus-border-gradient-a: alpha (@keyboard_focus_border_a, 0.62);
-adwaita-focus-border-gradient-b: alpha (@keyboard_focus_border_b, 0.62);
+ -adwaita-focus-border-radius: 1;
-GtkWidget-focus-line-width: 2;
border-radius: 2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]