[gnome-boxes/wip/cdavis/hdywindow: 6/6] Use HdyApplicationWindow and HdyHeaderBar




commit 70aa88d18a3e8215db9f9b15be55fdeae051b55d
Author: Christopher Davis <brainblasted disroot org>
Date:   Sat Dec 26 20:14:36 2020 -0800

    Use HdyApplicationWindow and HdyHeaderBar
    
    Gives us rounded bottom corners.

 data/ui/app-window.ui         | 53 +++++++++++++++++++++----------------------
 data/ui/collection-toolbar.ui |  2 +-
 data/ui/display-toolbar.ui    |  2 +-
 data/ui/selection-toolbar.ui  |  2 +-
 src/app-window.vala           |  2 +-
 src/collection-toolbar.vala   |  2 +-
 src/display-toolbar.vala      |  2 +-
 src/selection-toolbar.vala    |  2 +-
 8 files changed, 33 insertions(+), 34 deletions(-)
---
diff --git a/data/ui/app-window.ui b/data/ui/app-window.ui
index 897df7a1..67739a76 100644
--- a/data/ui/app-window.ui
+++ b/data/ui/app-window.ui
@@ -7,30 +7,29 @@
     window = new Boxes.ApplicationWindow ();
      |
      |-> main_vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
-     |     |
-     |     |-> searchbar = new Searchbar ();
-     |     |
-     |     |-> notification_overlay = new Gtk.Overlay ();
-     |     |    |
-     |     |    |-> notificationbar = Boxes.Notificationbar ();
-     |     |    |
-     |     |    |-> below_bin = new Gtk.Stack ();
-     |     |        |
-     |     |        |-> icon_view = new Boxes.IconView ();
-     |     |        |
-     |     |        |-> list_view = new Boxes.ListView ();
-     |     |        |
-     |     |        |-> empty_boxes = new Boxes.EmptyBoxes ();
-     |     |        |
-     |     |        |-> display_page = new Boxes.DisplayPage ();
-     |     |
-     |     |-> selectionbar = new Boxes.Selectionbar ();
-     |
-     |-> topbar = new Boxes.Topbar (); // as titlebar
+           |-> topbar = new Boxes.Topbar (); // as titlebar
+           |
+           |-> searchbar = new Searchbar ();
+           |
+           |-> notification_overlay = new Gtk.Overlay ();
+           |    |
+           |    |-> notificationbar = Boxes.Notificationbar ();
+           |    |
+           |    |-> below_bin = new Gtk.Stack ();
+           |        |
+           |        |-> icon_view = new Boxes.IconView ();
+           |        |
+           |        |-> list_view = new Boxes.ListView ();
+           |        |
+           |        |-> empty_boxes = new Boxes.EmptyBoxes ();
+           |        |
+           |        |-> display_page = new Boxes.DisplayPage ();
+           |
+           |-> selectionbar = new Boxes.Selectionbar ();
 
   -->
 
-  <template class="BoxesAppWindow" parent="GtkApplicationWindow">
+  <template class="BoxesAppWindow" parent="HdyApplicationWindow">
     <property name="visible">False</property>
     <property name="show-menubar">False</property>
     <property name="title" translatable="yes">Boxes</property>
@@ -49,6 +48,12 @@
         <property name="hexpand">True</property>
         <property name="vexpand">True</property>
 
+        <child>
+          <object class="BoxesTopbar" id="topbar">
+            <property name="visible">True</property>
+          </object>
+        </child>
+
         <child>
           <object class="BoxesSearchbar" id="searchbar">
             <property name="visible">True</property>
@@ -162,11 +167,5 @@
         </child>
       </object>
     </child>
-
-    <child type="titlebar">
-      <object class="BoxesTopbar" id="topbar">
-        <property name="visible">True</property>
-      </object>
-    </child>
   </template>
 </interface>
diff --git a/data/ui/collection-toolbar.ui b/data/ui/collection-toolbar.ui
index bdf90683..7465f04a 100644
--- a/data/ui/collection-toolbar.ui
+++ b/data/ui/collection-toolbar.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.9 -->
-  <template class="BoxesCollectionToolbar" parent="GtkHeaderBar">
+  <template class="BoxesCollectionToolbar" parent="HdyHeaderBar">
     <property name="visible">True</property>
     <property name="show-close-button">True</property>
     <property name="title" translatable="yes">Boxes</property>
diff --git a/data/ui/display-toolbar.ui b/data/ui/display-toolbar.ui
index e8e0d6c6..11e5e90f 100644
--- a/data/ui/display-toolbar.ui
+++ b/data/ui/display-toolbar.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.9 -->
-  <template class="BoxesDisplayToolbar" parent="GtkHeaderBar">
+  <template class="BoxesDisplayToolbar" parent="HdyHeaderBar">
     <property name="visible">True</property>
     <style>
       <class name="titlebar"/>
diff --git a/data/ui/selection-toolbar.ui b/data/ui/selection-toolbar.ui
index f97c1bd7..d1b92241 100644
--- a/data/ui/selection-toolbar.ui
+++ b/data/ui/selection-toolbar.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.9 -->
-  <template class="BoxesSelectionToolbar" parent="GtkHeaderBar">
+  <template class="BoxesSelectionToolbar" parent="HdyHeaderBar">
     <property name="visible">True</property>
     <property name="show-close-button">False</property>
     <style>
diff --git a/src/app-window.vala b/src/app-window.vala
index 0e5670e2..348ce22c 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -3,7 +3,7 @@
 using Gdk;
 
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/app-window.ui")]
-private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
+private class Boxes.AppWindow: Hdy.ApplicationWindow, Boxes.UI {
     public const uint TRANSITION_DURATION = 400; // milliseconds
 
     public enum ViewType {
diff --git a/src/collection-toolbar.vala b/src/collection-toolbar.vala
index 77465052..54f86e3a 100644
--- a/src/collection-toolbar.vala
+++ b/src/collection-toolbar.vala
@@ -2,7 +2,7 @@
 using Gtk;
 
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/collection-toolbar.ui")]
-private class Boxes.CollectionToolbar: HeaderBar {
+private class Boxes.CollectionToolbar: Hdy.HeaderBar {
     [GtkChild]
     private Button search_btn;
     [GtkChild]
diff --git a/src/display-toolbar.vala b/src/display-toolbar.vala
index e506e65b..b02d03c7 100644
--- a/src/display-toolbar.vala
+++ b/src/display-toolbar.vala
@@ -2,7 +2,7 @@
 using Gtk;
 
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/display-toolbar.ui")]
-private class Boxes.DisplayToolbar: Gtk.HeaderBar {
+private class Boxes.DisplayToolbar: Hdy.HeaderBar {
     public bool overlay { get; construct; }
     public bool handle_drag { get; construct; } // Handle drag events to (un)fulscreen the main window
 
diff --git a/src/selection-toolbar.vala b/src/selection-toolbar.vala
index 074e9bef..0f6d44be 100644
--- a/src/selection-toolbar.vala
+++ b/src/selection-toolbar.vala
@@ -2,7 +2,7 @@
 using Gtk;
 
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/selection-toolbar.ui")]
-private class Boxes.SelectionToolbar: HeaderBar {
+private class Boxes.SelectionToolbar: Hdy.HeaderBar {
     [GtkChild]
     private Button search_btn;
     [GtkChild]


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