[gtk/wip/baedert/for-master: 3/3] emojichooser: Add style class to emoji toolbar



commit 76b81520c10e730614f7d4d61dc4330df9b8403e
Author: Timm Bäder <mail baedert org>
Date:   Wed Feb 19 18:13:55 2020 +0100

    emojichooser: Add style class to emoji toolbar
    
    Closes #1013

 gtk/gtkemojichooser.c     | 17 +++++++++++++++++
 gtk/ui/gtkemojichooser.ui |  3 +++
 2 files changed, 20 insertions(+)
---
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index 36d3e35cfc..641cd33438 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -47,6 +47,23 @@
  *
  * GtkEmojiChooser emits the #GtkEmojiChooser:emoji-picked signal when an
  * Emoji is selected.
+ *
+ * # CSS nodes
+ * |[<!-- language="plain" -->
+ * popover
+ * ╰── box.emoji-toolbar
+ *     ├── button.iamge-button.emoji-section
+ *     ├── ...
+ *     ╰── button.image-button.emoji-section
+ * ]|
+ *
+ * Every #GtkEmojiChooser consists of a main node called popover.
+ * The contents of the popover are largely implementation defined
+ * and supposed to inherit general styles.
+ * The bottom toolbar used to switch between different emoji categories
+ * consists of buttons with the .emoji-section style class and gets the
+ * .emoji-toolbar style class itself.
+ *
  */
 
 #define BOX_SPACE 6
diff --git a/gtk/ui/gtkemojichooser.ui b/gtk/ui/gtkemojichooser.ui
index aab6676082..35f335b1ba 100644
--- a/gtk/ui/gtkemojichooser.ui
+++ b/gtk/ui/gtkemojichooser.ui
@@ -197,6 +197,9 @@
                     </child>
                     <child>
                       <object class="GtkBox">
+                        <style>
+                          <class name="emoji-toolbar" />
+                        </style>
                         <child>
                           <object class="GtkButton" id="recent.button">
                             <property name="relief">none</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]