[gtk+/client-side-decorations] Disable drop-shadows by default
- From: Cody Russell <bratsche src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/client-side-decorations] Disable drop-shadows by default
- Date: Wed, 2 Dec 2009 23:11:00 +0000 (UTC)
commit 381ba5003a2f203d43c2fbab4edefe56f601a5db
Author: Cody Russell <bratsche gnome org>
Date: Wed Dec 2 17:04:54 2009 -0600
Disable drop-shadows by default
gtk/gtkstyle.c | 19 ++++++++++++++-----
gtk/gtkwindow.c | 17 ++++++++++++-----
2 files changed, 26 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 0b60b2e..6b4cae8 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -3745,11 +3745,20 @@ paint_decorated_window (GtkStyle *style,
}
else
{
- paint_window_shadow (cr,
- width,
- height,
- x / 2 + 2.5,
- radius);
+ gboolean paint_shadows;
+
+ gtk_widget_style_get (widget,
+ "client-side-drop-shadows", &paint_shadows,
+ NULL);
+
+ if (paint_shadows)
+ {
+ paint_window_shadow (cr,
+ width,
+ height,
+ x / 2 + 2.5,
+ radius);
+ }
cairo_move_to (cr, hmargin, vmargin + radius);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 5f14ed1..c06b312 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -896,8 +896,15 @@ gtk_window_class_init (GtkWindowClass *klass)
0, G_MAXINT,
20, GTK_PARAM_READWRITE));
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("client-side-drop-shadows",
+ P_("Client-side drop shadows"),
+ P_("Whether to draw client-side drop shadows"),
+ FALSE,
+ GTK_PARAM_READWRITE));
+
/**
- * GtkWindow:decoration-extents:
+ * GtkWindow:extents-left:
*
* Specifies the size of the client-side window extents, which can be
* used for client-side window drop-shadows or window glow.
@@ -907,7 +914,7 @@ gtk_window_class_init (GtkWindowClass *klass)
P_("Left extents"),
P_("Left extents area"),
0, G_MAXINT,
- 40,
+ 0,
GTK_PARAM_READWRITE));
gtk_widget_class_install_style_property (widget_class,
@@ -915,7 +922,7 @@ gtk_window_class_init (GtkWindowClass *klass)
P_("Top extents"),
P_("Top extents area"),
0, G_MAXINT,
- 40,
+ 0,
GTK_PARAM_READWRITE));
gtk_widget_class_install_style_property (widget_class,
@@ -923,7 +930,7 @@ gtk_window_class_init (GtkWindowClass *klass)
P_("Right extents"),
P_("Right extents area"),
0, G_MAXINT,
- 40,
+ 0,
GTK_PARAM_READWRITE));
gtk_widget_class_install_style_property (widget_class,
@@ -931,7 +938,7 @@ gtk_window_class_init (GtkWindowClass *klass)
P_("Bottom extents"),
P_("Bottom extents area"),
0, G_MAXINT,
- 40,
+ 0,
GTK_PARAM_READWRITE));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]