summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-01-15 17:55:44 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-01-15 17:55:44 -0500
commite8b9aacfc19223e16287213cca2e376e3d66d587 (patch)
tree60d5037b0f16ebb55f0f81d3e5538bf782a8bd1d /gtk
parent54a6e032ca86de5a282e27a0a0cc298a27d32a1a (diff)
downloadgtk+-e8b9aacfc19223e16287213cca2e376e3d66d587.tar.gz
combo: Add .linked class when appropriate
Add the .linked style class to combo boxes which have an entry, since that is what they are.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcombobox.c3
-rw-r--r--gtk/gtkcomboboxtext.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index e3ec42dad7..f5661d34c6 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -4483,6 +4483,9 @@ gtk_combo_box_constructed (GObject *object)
gtk_widget_show (entry);
gtk_container_add (GTK_CONTAINER (combo_box), entry);
+ context = gtk_widget_get_style_context (GTK_WIDGET (combo_box));
+ gtk_style_context_add_class (context, "linked");
+
context = gtk_widget_get_style_context (GTK_WIDGET (entry));
gtk_style_context_add_class (context, "combo");
diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c
index 43410f3cb7..12447e79f0 100644
--- a/gtk/gtkcomboboxtext.c
+++ b/gtk/gtkcomboboxtext.c
@@ -74,7 +74,7 @@
* # CSS nodes
*
* |[<!-- language="plain" -->
- * combobox
+ * combobox.linked
* ├── entry.combo
* ├── button.combo
* ╰── window.popup
@@ -82,7 +82,7 @@
*
* GtkComboBoxText has a single CSS node with name combobox. It adds
* the style class .combo to the main CSS nodes of its entry and button
- * children.
+ * children, and the .linked class to the main node.
*/
static void gtk_combo_box_text_buildable_interface_init (GtkBuildableIface *iface);