Commit ef41bd71 authored by Cosimo Cecchi's avatar Cosimo Cecchi

combobox: deprecate shadow-type style property

It does not add any value to what can be achieved through regular CSS
styling.
parent f5628f04
...@@ -115,7 +115,6 @@ struct _GtkComboBoxPrivate ...@@ -115,7 +115,6 @@ struct _GtkComboBoxPrivate
gint row_column; gint row_column;
gint wrap_width; gint wrap_width;
GtkShadowType shadow_type;
gint active; /* Only temporary */ gint active; /* Only temporary */
GtkTreeRowReference *active_row; GtkTreeRowReference *active_row;
...@@ -1335,6 +1334,9 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) ...@@ -1335,6 +1334,9 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
* Which kind of shadow to draw around the combo box. * Which kind of shadow to draw around the combo box.
* *
* Since: 2.12 * Since: 2.12
*
* Deprecated: 3.20: use CSS styling to change the appearance of the combobox
* frame; the value of this style property is ignored.
*/ */
gtk_widget_class_install_style_property (widget_class, gtk_widget_class_install_style_property (widget_class,
g_param_spec_enum ("shadow-type", g_param_spec_enum ("shadow-type",
...@@ -1342,7 +1344,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) ...@@ -1342,7 +1344,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
P_("Which kind of shadow to draw around the combo box"), P_("Which kind of shadow to draw around the combo box"),
GTK_TYPE_SHADOW_TYPE, GTK_TYPE_SHADOW_TYPE,
GTK_SHADOW_NONE, GTK_SHADOW_NONE,
GTK_PARAM_READABLE)); GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/ui/gtkcombobox.ui"); gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/ui/gtkcombobox.ui");
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkComboBox, button); gtk_widget_class_bind_template_child_internal_private (widget_class, GtkComboBox, button);
...@@ -1693,28 +1695,16 @@ gtk_combo_box_check_appearance (GtkComboBox *combo_box) ...@@ -1693,28 +1695,16 @@ gtk_combo_box_check_appearance (GtkComboBox *combo_box)
if (!GTK_IS_MENU (priv->popup_widget)) if (!GTK_IS_MENU (priv->popup_widget))
gtk_combo_box_menu_setup (combo_box); gtk_combo_box_menu_setup (combo_box);
} }
gtk_widget_style_get (GTK_WIDGET (combo_box),
"shadow-type", &priv->shadow_type,
NULL);
} }
static void static void
gtk_combo_box_style_updated (GtkWidget *widget) gtk_combo_box_style_updated (GtkWidget *widget)
{ {
GtkComboBox *combo_box = GTK_COMBO_BOX (widget); GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
GtkComboBoxPrivate *priv = combo_box->priv;
GtkWidget *child;
GTK_WIDGET_CLASS (gtk_combo_box_parent_class)->style_updated (widget); GTK_WIDGET_CLASS (gtk_combo_box_parent_class)->style_updated (widget);
gtk_combo_box_check_appearance (combo_box); gtk_combo_box_check_appearance (combo_box);
child = gtk_bin_get_child (GTK_BIN (combo_box));
if (GTK_IS_ENTRY (child))
g_object_set (child, "shadow-type",
GTK_SHADOW_NONE == priv->shadow_type ?
GTK_SHADOW_IN : GTK_SHADOW_NONE, NULL);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment