[gtk+/client-side-decorations: 82/92] Disable drop-shadows by default
- From: Cody Russell <bratsche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/client-side-decorations: 82/92] Disable drop-shadows by default
- Date: Fri, 16 Apr 2010 19:33:59 +0000 (UTC)
commit c39adf64aa71cb32bef8e7abd5fc4ed4bc103974
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 f8c164c..c7db093 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -3772,11 +3772,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 ffb9dfc..34ab5dd 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -909,8 +909,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.
@@ -920,7 +927,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,
@@ -928,7 +935,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,
@@ -936,7 +943,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,
@@ -944,7 +951,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]