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



commit 6054393cc1e2dbe2ca15c607deff384056bb7734
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..181d38638b 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 consits 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]