[gtk+] statusbar: Deprecate style properties
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] statusbar: Deprecate style properties
- Date: Sun, 20 Dec 2015 04:54:27 +0000 (UTC)
commit f792d20507b2714c964f11c576dd9a5c5be96a6d
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 19 23:53:31 2015 -0500
statusbar: Deprecate style properties
We were not really using the shadow-type style property anyway,
so lets just deprecate it. Themes can directly theme the frame.
gtk/gtkstatusbar.c | 14 +++++++++-----
gtk/theme/Adwaita/_common.scss | 2 --
gtk/theme/Adwaita/gtk-contained-dark.css | 1 -
gtk/theme/Adwaita/gtk-contained.css | 1 -
4 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index b5ee324..258e27d 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -165,13 +165,21 @@ gtk_statusbar_class_init (GtkStatusbarClass *class)
G_TYPE_UINT,
G_TYPE_STRING);
+ /**
+ * GtkStatusbar:shadow-type:
+ *
+ * The style of the bevel around the statusbar text.
+ *
+ * Deprecated: 3.20: Use CSS properties to determine the appearance,
+ * the value of this style property is ignored.
+ */
gtk_widget_class_install_style_property (widget_class,
g_param_spec_enum ("shadow-type",
P_("Shadow type"),
P_("Style of bevel around the statusbar text"),
GTK_TYPE_SHADOW_TYPE,
GTK_SHADOW_IN,
- GTK_PARAM_READABLE));
+ GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
/* Bind class to template
*/
@@ -188,7 +196,6 @@ static void
gtk_statusbar_init (GtkStatusbar *statusbar)
{
GtkStatusbarPrivate *priv;
- GtkShadowType shadow_type;
statusbar->priv = gtk_statusbar_get_instance_private (statusbar);
priv = statusbar->priv;
@@ -199,10 +206,7 @@ gtk_statusbar_init (GtkStatusbar *statusbar)
priv->keys = NULL;
gtk_widget_init_template (GTK_WIDGET (statusbar));
-
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (statusbar), TRUE);
- gtk_widget_style_get (GTK_WIDGET (statusbar), "shadow-type", &shadow_type, NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (priv->frame), shadow_type);
}
/**
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 8dbd62d..5e8c791 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -31,8 +31,6 @@ $asset_suffix: if($variant=='dark', '-dark', '');
-GtkDialog-button-spacing: 4;
-GtkDialog-action-area-border: 0;
- -GtkStatusbar-shadow-type: none;
-
// We use the outline properties to signal the focus properties
// to the adwaita engine: using real CSS properties is faster,
// and we don't use any outlines for now.
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 445f661..06d2cd1 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -12,7 +12,6 @@
-GtkWidget-text-handle-height: 24;
-GtkDialog-button-spacing: 4;
-GtkDialog-action-area-border: 0;
- -GtkStatusbar-shadow-type: none;
outline-color: rgba(238, 238, 236, 0.3);
outline-style: dashed;
outline-offset: -3px;
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 434b449..d72301e 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -12,7 +12,6 @@
-GtkWidget-text-handle-height: 24;
-GtkDialog-button-spacing: 4;
-GtkDialog-action-area-border: 0;
- -GtkStatusbar-shadow-type: none;
outline-color: rgba(46, 52, 54, 0.3);
outline-style: dashed;
outline-offset: -3px;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]