[libadwaita/wip/exalm/borderless: 13/14] example: Add a split button+button content page




commit 58fbb42b0829328cf7c4c8f3fa3ff183af3c91a6
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Sep 8 13:09:21 2021 +0500

    example: Add a split button+button content page

 examples/adw-demo-window.ui | 126 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 126 insertions(+)
---
diff --git a/examples/adw-demo-window.ui b/examples/adw-demo-window.ui
index 42b26f61..8e6db78f 100644
--- a/examples/adw-demo-window.ui
+++ b/examples/adw-demo-window.ui
@@ -11,6 +11,19 @@
       </item>
     </section>
   </menu>
+  <menu id="sample_menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">Item 1</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">Item 2</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">Item 3</attribute>
+      </item>
+    </section>
+  </menu>
   <template class="AdwDemoWindow" parent="AdwApplicationWindow">
     <property name="title" translatable="yes">Adwaita Demo</property>
     <property name="default_width">800</property>
@@ -833,6 +846,119 @@
                         </property>
                       </object>
                     </child>
+                    <child>
+                      <object class="GtkStackPage">
+                        <property name="name">buttons</property>
+                        <property name="title" translatable="yes">Buttons</property>
+                        <property name="child">
+                          <object class="AdwStatusPage">
+                            <property name="title" translatable="yes">Buttons</property>
+                            <property name="description" translatable="yes">Button helper widgets.</property>
+                            <property name="child">
+                              <object class="AdwClamp">
+                                <property name="maximum-size">400</property>
+                                <property name="tightening-threshold">300</property>
+                                <property name="child">
+                                  <object class="GtkBox">
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkGrid">
+                                        <property name="halign">center</property>
+                                        <property name="column-spacing">12</property>
+                                        <property name="row-spacing">12</property>
+                                        <child>
+                                          <object class="AdwSplitButton">
+                                            <property name="icon-name">document-open-symbolic</property>
+                                            <property name="menu-model">sample_menu</property>
+                                            <layout>
+                                              <property name="column">0</property>
+                                              <property name="row">0</property>
+                                            </layout>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="AdwSplitButton">
+                                            <property name="icon-name">document-open-symbolic</property>
+                                            <property name="menu-model">sample_menu</property>
+                                            <style>
+                                              <class name="flat"/>
+                                            </style>
+                                            <layout>
+                                              <property name="column">0</property>
+                                              <property name="row">1</property>
+                                            </layout>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="AdwSplitButton">
+                                            <property name="label" translatable="yes">_Open</property>
+                                            <property name="use-underline">True</property>
+                                            <property name="menu-model">sample_menu</property>
+                                            <layout>
+                                              <property name="column">1</property>
+                                              <property name="row">0</property>
+                                            </layout>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="AdwSplitButton">
+                                            <property name="label" translatable="yes">_Open</property>
+                                            <property name="use-underline">True</property>
+                                            <property name="menu-model">sample_menu</property>
+                                            <style>
+                                              <class name="flat"/>
+                                            </style>
+                                            <layout>
+                                              <property name="column">1</property>
+                                              <property name="row">1</property>
+                                            </layout>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="AdwSplitButton">
+                                            <property name="child">
+                                              <object class="AdwButtonContent">
+                                                <property name="icon-name">document-open-symbolic</property>
+                                                <property name="label" translatable="yes">_Open</property>
+                                                <property name="use-underline">True</property>
+                                              </object>
+                                            </property>
+                                            <property name="menu-model">sample_menu</property>
+                                            <layout>
+                                              <property name="column">2</property>
+                                              <property name="row">0</property>
+                                            </layout>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="AdwSplitButton">
+                                            <property name="child">
+                                              <object class="AdwButtonContent">
+                                                <property name="icon-name">document-open-symbolic</property>
+                                                <property name="label" translatable="yes">_Open</property>
+                                                <property name="use-underline">True</property>
+                                              </object>
+                                            </property>
+                                            <property name="menu-model">sample_menu</property>
+                                            <style>
+                                              <class name="flat"/>
+                                            </style>
+                                            <layout>
+                                              <property name="column">2</property>
+                                              <property name="row">1</property>
+                                            </layout>
+                                          </object>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </property>
+                              </object>
+                            </property>
+                          </object>
+                        </property>
+                      </object>
+                    </child>
                   </object>
                 </child>
               </object>


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