[libadwaita/wip/exalm/borderless: 16/16] example




commit 005c501f5f233c10559a6169098310b3d352a6c5
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Jul 4 18:57:30 2021 +0500

    example

 examples/adw-view-switcher-demo-window.ui          | 314 ++++++++++++++++++---
 .../icons/scalable/actions/tab-new-symbolic.svg    | 152 +++++++++-
 2 files changed, 423 insertions(+), 43 deletions(-)
---
diff --git a/examples/adw-view-switcher-demo-window.ui b/examples/adw-view-switcher-demo-window.ui
index 06fb8476..fde60ad3 100644
--- a/examples/adw-view-switcher-demo-window.ui
+++ b/examples/adw-view-switcher-demo-window.ui
@@ -4,86 +4,168 @@
   <requires lib="gtk" version="4.0"/>
   <requires lib="libadwaita" version="1.0"/>
   <template class="AdwViewSwitcherDemoWindow" parent="AdwWindow">
-    <property name="modal">True</property>
     <property name="title" translatable="yes">AdwViewSwitcher Demo</property>
-    <child>
+    <property name="default-width">800</property>
+    <property name="default-height">600</property>
+    <property name="child">
       <object class="GtkBox">
         <property name="orientation">vertical</property>
         <child>
           <object class="AdwHeaderBar">
-            <property name="centering-policy">strict</property>
             <property name="title-widget">
-              <object class="AdwViewSwitcherTitle" id="switcher_title">
+              <object class="AdwViewSwitcherTitle">
+                <binding name="title">
+                  <lookup name="title">AdwViewSwitcherDemoWindow</lookup>
+                </binding>
                 <property name="stack">stack</property>
-                <property name="title" bind-source="AdwViewSwitcherDemoWindow" bind-property="title" 
bind-flags="sync-create"/>
               </object>
             </property>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">go-previous-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">go-next-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">view-refresh-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">tab-new-symbolic</property>
+              </object>
+            </child>
+            <property name="title-widget">
+              <object class="GtkEntry">
+                <property name="placeholder-text">Search for websites, bookmarks and open tabs</property>
+              </object>
+            </property>
+            <child type="end">
+              <object class="GtkMenuButton">
+                <property name="icon-name">open-menu-symbolic</property>
+                <property name="menu-model">menu</property>
+              </object>
+            </child>
+            <child type="end">
+              <object class="GtkMenuButton">
+                <property name="icon-name">document-open-symbolic</property>
+                <property name="always-show-arrow">True</property>
+                <property name="menu-model">menu</property>
+              </object>
+            </child>
+            <child type="end">
+              <object class="AdwSplitButton">
+                <property name="icon-name">media-playback-start-symbolic</property>
+                <property name="menu-model">menu</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <style>
+              <class name="toolbar"/>
+            </style>
+            <child>
+              <object class="GtkBox">
+                <style>
+                  <class name="linked"/>
+                </style>
+                <child>
+                  <object class="GtkSearchEntry"/>
+                </child>
+                <child>
+                  <object class="GtkButton">
+                    <property name="icon-name">go-up-symbolic</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton">
+                    <property name="icon-name">go-down-symbolic</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">edit-find-symbolic</property>
+                <property name="hexpand">True</property>
+                <property name="halign">end</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">edit-find-replace-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuButton">
+                <property name="icon-name">view-more-symbolic</property>
+                <property name="menu-model">menu</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <style>
+              <class name="sidebar"/>
+            </style>
           </object>
         </child>
         <child>
           <object class="GtkStack" id="stack">
-            <property name="transition-type">crossfade</property>
             <property name="vexpand">True</property>
+            <property name="transition-type">crossfade</property>
             <child>
               <object class="GtkStackPage">
-                <property name="name">page1</property>
-                <property name="title" translatable="yes">World</property>
                 <property name="icon-name">clock-world-symbolic</property>
+                <property name="title">World</property>
                 <property name="child">
-                  <object class="GtkLabel">
-                    <property name="margin-top">24</property>
-                    <property name="margin-bottom">24</property>
-                    <property name="margin-start">24</property>
-                    <property name="margin-end">24</property>
-                    <property name="label" translatable="yes">World</property>
+                  <object class="AdwStatusPage">
+                    <property name="icon-name">clock-world-symbolic</property>
+                    <property name="title">World</property>
                   </object>
                 </property>
               </object>
             </child>
             <child>
               <object class="GtkStackPage">
-                <property name="name">page2</property>
-                <property name="title" translatable="yes">Alarm</property>
                 <property name="icon-name">clock-alarm-symbolic</property>
+                <property name="title">Alarms</property>
                 <property name="child">
-                  <object class="GtkLabel">
-                    <property name="margin-top">24</property>
-                    <property name="margin-bottom">24</property>
-                    <property name="margin-start">24</property>
-                    <property name="margin-end">24</property>
-                    <property name="label" translatable="yes">Alarm</property>
+                  <object class="AdwStatusPage">
+                    <property name="icon-name">clock-alarm-symbolic</property>
+                    <property name="title">Alarms</property>
                   </object>
                 </property>
               </object>
             </child>
             <child>
               <object class="GtkStackPage">
-                <property name="name">page3</property>
-                <property name="title" translatable="yes">Stopwatch</property>
                 <property name="icon-name">clock-stopwatch-symbolic</property>
+                <property name="title">Stopwatch</property>
                 <property name="child">
-                  <object class="GtkLabel">
-                    <property name="margin-top">24</property>
-                    <property name="margin-bottom">24</property>
-                    <property name="margin-start">24</property>
-                    <property name="margin-end">24</property>
-                    <property name="label" translatable="yes">Stopwatch</property>
+                  <object class="AdwStatusPage">
+                    <property name="icon-name">clock-stopwatch-symbolic</property>
+                    <property name="title">Stopwatch</property>
                   </object>
                 </property>
               </object>
             </child>
             <child>
               <object class="GtkStackPage">
-                <property name="name">page4</property>
-                <property name="title" translatable="yes">Timer</property>
                 <property name="icon-name">clock-timer-symbolic</property>
+                <property name="title">Timer</property>
                 <property name="child">
-                  <object class="GtkLabel">
-                    <property name="margin-top">24</property>
-                    <property name="margin-bottom">24</property>
-                    <property name="margin-start">24</property>
-                    <property name="margin-end">24</property>
-                    <property name="label" translatable="yes">Timer</property>
+                  <object class="AdwStatusPage">
+                    <property name="icon-name">clock-timer-symbolic</property>
+                    <property name="title">Timer</property>
                   </object>
                 </property>
               </object>
@@ -91,12 +173,160 @@
           </object>
         </child>
         <child>
-          <object class="AdwViewSwitcherBar" id="switcher_bar">
-            <property name="stack">stack</property>
-            <property name="reveal" bind-source="switcher_title" bind-property="title-visible" 
bind-flags="sync-create"/>
+          <object class="GtkSeparator">
+            <style>
+              <class name="sidebar"/>
+            </style>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <style>
+              <class name="toolbar"/>
+            </style>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">format-text-bold-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">format-text-italic-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">format-text-underline-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">format-text-strikethrough-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkSeparator"/>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="bold">
+                <property name="icon-name">format-justify-left-symbolic</property>
+                <property name="active">True</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">format-justify-center-symbolic</property>
+                <property name="group">bold</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">format-justify-right-symbolic</property>
+                <property name="group">bold</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkToggleButton">
+                <property name="icon-name">format-justify-fill-symbolic</property>
+                <property name="group">bold</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkVolumeButton">
+              </object>
+            </child>
+            <child>
+              <object class="GtkVolumeButton">
+              </object>
+            </child>
+            <child>
+              <object class="GtkSeparator"/>
+            </child>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">format-indent-less-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">format-indent-more-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkSeparator"/>
+            </child>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">insert-image-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">insert-link-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton">
+                <property name="icon-name">insert-object-symbolic</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkActionBar">
+            <child type="center">
+              <object class="AdwViewSwitcherTitle">
+                <binding name="title">
+                  <lookup name="title">AdwViewSwitcherDemoWindow</lookup>
+                </binding>
+                <property name="stack">stack</property>
+              </object>
+            </child>
+            <child type="start">
+              <object class="GtkMenuButton">
+                <property name="label">Open</property>
+                <property name="menu-model">menu</property>
+              </object>
+            </child>
+            <child type="start">
+              <object class="GtkButton">
+                <property name="icon-name">document-print-symbolic</property>
+              </object>
+            </child>
+            <child type="start">
+              <object class="GtkButton">
+                <property name="icon-name">user-trash-symbolic</property>
+              </object>
+            </child>
+            <child type="end">
+              <object class="GtkButton">
+                <property name="label">Properties</property>
+              </object>
+            </child>
+            <child type="end">
+              <object class="AdwSplitButton">
+                <property name="label">Open</property>
+                <property name="menu-model">menu</property>
+              </object>
+            </child>
           </object>
         </child>
       </object>
-    </child>
+    </property>
   </template>
+  <menu id="menu">
+    <section>
+      <item>
+        <attribute name="label">Something</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label">Preferences</attribute>
+      </item>
+      <item>
+        <attribute name="label">About Demo</attribute>
+      </item>
+    </section>
+  </menu>
 </interface>
diff --git a/examples/icons/scalable/actions/tab-new-symbolic.svg 
b/examples/icons/scalable/actions/tab-new-symbolic.svg
index f1f4ebb8..1e8214c5 100644
--- a/examples/icons/scalable/actions/tab-new-symbolic.svg
+++ b/examples/icons/scalable/actions/tab-new-symbolic.svg
@@ -1 +1,151 @@
-<svg xmlns="http://www.w3.org/2000/svg"; width="16.009" height="16"><g fill="#2e3436"><path d="M4.003 
1s-.709-.014-1.447.355C1.817 1.725 1.003 2.667 1.003 4v9h-1l-.004 2h.004l3 
.01V15h13v-2h-1V4s.014-.709-.355-1.447C14.278 1.814 13.336 1 12.003 1zm0 2h8c.667 0 
.725.186.855.447.131.262.145.553.145.553v9h-10V4c0-.667.186-.725.447-.855.262-.131.553-.145.553-.145z" 
style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal"
 color="#000" font-weight="400" font-family="sans-serif" overflow="visible"/><path d="M7.009 
5v2h-2v2h2v2h2V9h2V7h-2V5z"/></g></svg>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+    <filter id="a" height="100%" width="100%" x="0%" y="0%">
+        <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
+    </filter>
+    <mask id="b">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.3"/>
+        </g>
+    </mask>
+    <clipPath id="c">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="d">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+        </g>
+    </mask>
+    <clipPath id="e">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="f">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+        </g>
+    </mask>
+    <clipPath id="g">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="h">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+        </g>
+    </mask>
+    <clipPath id="i">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="j">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+        </g>
+    </mask>
+    <clipPath id="k">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="l">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+        </g>
+    </mask>
+    <clipPath id="m">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="n">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+        </g>
+    </mask>
+    <clipPath id="o">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="p">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.3"/>
+        </g>
+    </mask>
+    <clipPath id="q">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="r">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.5"/>
+        </g>
+    </mask>
+    <clipPath id="s">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="t">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.4"/>
+        </g>
+    </mask>
+    <clipPath id="u">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="v">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.4"/>
+        </g>
+    </mask>
+    <clipPath id="w">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="x">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.5"/>
+        </g>
+    </mask>
+    <clipPath id="y">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <mask id="z">
+        <g filter="url(#a)">
+            <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.5"/>
+        </g>
+    </mask>
+    <clipPath id="A">
+        <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+    </clipPath>
+    <path d="m 4 1 s -0.707031 -0.015625 -1.445312 0.355469 c -0.742188 0.371093 -1.554688 1.3125 -1.554688 
2.644531 v 9 h -1 l -0.00390625 2 h 0.00390625 l 3 0.011719 v -0.011719 h 13 v -2 h -1 v -9 s 0.015625 
-0.707031 -0.355469 -1.445312 c -0.371093 -0.742188 -1.3125 -1.554688 -2.644531 -1.554688 z m 0 2 h 8 c 
0.667969 0 0.726562 0.1875 0.855469 0.445312 c 0.128906 0.261719 0.144531 0.554688 0.144531 0.554688 v 9 h 
-10 v -9 c 0 -0.667969 0.1875 -0.726562 0.449219 -0.855469 c 0.257812 -0.128906 0.550781 -0.144531 0.550781 
-0.144531 z m 0 0" fill="#2e3436"/>
+    <path d="m 7.003906 5 v 2 h -2 v 2 h 2 v 2 h 2 v -2 h 2 v -2 h -2 v -2 z m 0 0" fill="#2e3436"/>
+    <g clip-path="url(#c)" mask="url(#b)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 562.460938 212.058594 h 10.449218 c -1.183594 0.492187 -1.296875 2.460937 0 3 h 
-10.449218 z m 0 0" fill="#2e3436"/>
+    </g>
+    <g clip-path="url(#e)" mask="url(#d)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 16 632 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+    </g>
+    <g clip-path="url(#g)" mask="url(#f)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 17 631 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+    </g>
+    <g clip-path="url(#i)" mask="url(#h)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 18 634 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+    </g>
+    <g clip-path="url(#k)" mask="url(#j)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 16 634 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+    </g>
+    <g clip-path="url(#m)" mask="url(#l)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 17 635 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+    </g>
+    <g clip-path="url(#o)" mask="url(#n)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 19 635 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+    </g>
+    <g clip-path="url(#q)" mask="url(#p)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 136 660 v 7 h 7 v -7 z m 0 0" fill="#2e3436"/>
+    </g>
+    <g clip-path="url(#s)" mask="url(#r)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 219 642 h 3 v 12 h -3 z m 0 0" fill="#2e3436"/>
+    </g>
+    <g clip-path="url(#u)" mask="url(#t)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 209.5 144.160156 c 0.277344 0 0.5 0.222656 0.5 0.5 v 1 c 0 0.277344 -0.222656 0.5 -0.5 
0.5 s -0.5 -0.222656 -0.5 -0.5 v -1 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m 0 0" fill="#2e3436"/>
+    </g>
+    <g clip-path="url(#w)" mask="url(#v)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 206.5 144.160156 c 0.277344 0 0.5 0.222656 0.5 0.5 v 1 c 0 0.277344 -0.222656 0.5 -0.5 
0.5 s -0.5 -0.222656 -0.5 -0.5 v -1 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m 0 0" fill="#2e3436"/>
+    </g>
+    <g clip-path="url(#y)" mask="url(#x)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 229.5 143.160156 c -0.546875 0 -1 0.457032 -1 1 c 0 0.546875 0.453125 1 1 1 s 1 -0.453125 
1 -1 c 0 -0.542968 -0.453125 -1 -1 -1 z m 0 0" fill="#2e3436"/>
+    </g>
+    <g clip-path="url(#A)" mask="url(#z)" transform="matrix(1 0 0 1 -680 -684)">
+        <path d="m 226.453125 143.160156 c -0.519531 0 -0.953125 0.433594 -0.953125 0.953125 v 0.09375 c 0 
0.519531 0.433594 0.953125 0.953125 0.953125 h 0.09375 c 0.519531 0 0.953125 -0.433594 0.953125 -0.953125 v 
-0.09375 c 0 -0.519531 -0.433594 -0.953125 -0.953125 -0.953125 z m 0 0" fill="#2e3436"/>
+    </g>
+</svg>


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