[gnome-clocks/wip/exalm/libhandy-1: 4/11] window: Subclass HdyApplicationWindow



commit e173b3bb594dfeab2559995abfe9c46e849fe872
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat May 23 00:12:46 2020 +0500

    window: Subclass HdyApplicationWindow

 data/ui/window.ui | 34 +++++++++++-----------------------
 src/window.vala   |  2 +-
 2 files changed, 12 insertions(+), 24 deletions(-)
---
diff --git a/data/ui/window.ui b/data/ui/window.ui
index 520981e..09dda47 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -3,25 +3,23 @@
   <!-- interface-requires gtk+ 3.20 -->
   <requires lib="gtk+" version="3.20"/>
   <requires lib="libhandy" version="0.0"/>
-  <template class="ClocksWindow" parent="GtkApplicationWindow">
+  <template class="ClocksWindow" parent="HdyApplicationWindow">
     <property name="title" bind-source="header_bar" bind-property="title" bind-flags="sync-create" />
-    <child type="titlebar">
-      <object class="ClocksHeaderBar" id="header_bar">
-        <property name="visible">True</property>
-        <property name="hexpand">True</property>
-        <property name="vexpand">False</property>
-        <property name="stack">stack</property>
-        <property name="switcher_bar">switcher_bar</property>
-        <style>
-          <class name="titlebar"/>
-        </style>
-      </object>
-    </child>
     <child>
       <object class="GtkBox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
+        <child>
+          <object class="ClocksHeaderBar" id="header_bar">
+            <property name="visible">True</property>
+            <property name="stack">stack</property>
+            <property name="switcher_bar">switcher_bar</property>
+            <style>
+              <class name="titlebar"/>
+            </style>
+          </object>
+        </child>
         <child>
           <object class="GtkStack" id="stack">
             <property name="visible">True</property>
@@ -71,11 +69,6 @@
               </packing>
             </child>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="HdyViewSwitcherBar" id="switcher_bar">
@@ -84,11 +77,6 @@
             <property name="stack">stack</property>
             <property name="reveal">True</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
diff --git a/src/window.vala b/src/window.vala
index 215b590..6c5c2ce 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -19,7 +19,7 @@
 namespace Clocks {
 
 [GtkTemplate (ui = "/org/gnome/clocks/ui/window.ui")]
-public class Window : Gtk.ApplicationWindow {
+public class Window : Hdy.ApplicationWindow {
     private const GLib.ActionEntry[] ACTION_ENTRIES = {
         // primary menu
         { "show-primary-menu", on_show_primary_menu_activate, null, "false", null },


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