[gnome-sound-recorder/wip/cdavis/gtk4: 1/2] Use libadwaita




commit 6d05e4b30648ce71abd456737505dd84baa78c12
Author: Christopher Davis <christopherdavis gnome org>
Date:   Tue Sep 21 03:59:14 2021 -0700

    Use libadwaita

 data/application.css         | 21 ---------------------
 data/ui/row.ui               |  2 +-
 data/ui/window.ui            |  6 +++---
 meson.build                  |  2 +-
 org.gnome.SoundRecorder.json | 31 ++++++++++++++++++++++++++-----
 src/application.js           |  4 ++--
 src/main.js                  |  2 +-
 src/window.js                |  4 ++--
 8 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/data/application.css b/data/application.css
index 172c129..27ef5c0 100644
--- a/data/application.css
+++ b/data/application.css
@@ -52,27 +52,6 @@ list row:last-child {
   border-bottom-right-radius: 8px;
 }
 
-list row.expanded {
-  margin-top: 10px;
-  margin-bottom: 10px;
-  border-radius: 8px;
-  border-bottom-width: 1px;
-  transition: 250ms all linear;
-}
-
-list row.expanded-before {
-  border-bottom-width: 1px;
-  border-bottom-right-radius: 8px;
-  border-bottom-left-radius: 8px;
-  transition: 250ms all linear;
-}
-
-list row.expanded-after {
-  border-top-right-radius: 8px;
-  border-top-left-radius: 8px;
-  transition: 250ms all linear;
-}
-
 list row:first-child.expanded {
   margin-top:0;
 }
diff --git a/data/ui/row.ui b/data/ui/row.ui
index 317b8c1..9fa8103 100644
--- a/data/ui/row.ui
+++ b/data/ui/row.ui
@@ -210,7 +210,7 @@
                           <object class="GtkStackPage">
                             <property name="name">options</property>
                             <property name="child">
-                              <object class="HdySqueezer">
+                              <object class="AdwSqueezer">
                                 <property name="homogeneous">True</property>
                                 <child>
                                   <object class="GtkBox">
diff --git a/data/ui/window.ui b/data/ui/window.ui
index 7c0e358..07a367e 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -3,7 +3,7 @@
 <interface>
   <requires lib="gtk+" version="3.20"/>
   <requires lib="libhandy" version="0.0"/>
-  <template class="Gjs_Window" parent="HdyApplicationWindow">
+  <template class="Gjs_Window" parent="AdwApplicationWindow">
     <property name="width_request">350</property>
     <property name="height_request">480</property>
     <property name="hexpand">True</property>
@@ -18,7 +18,7 @@
           <object class="GtkRevealer" id="headerRevealer">
             <property name="reveal_child">True</property>
             <child>
-              <object class="HdyHeaderBar">
+              <object class="AdwHeaderBar">
                 <child>
                   <object class="GtkButton">
                     <property name="receives_default">False</property>
@@ -126,7 +126,7 @@
                           <object class="GtkViewport">
                             <property name="scroll_to_focus">True</property>
                             <property name="child">
-                              <object class="HdyClamp" id="column">
+                              <object class="AdwClamp" id="column">
                                 <property name="maximum_size">650</property>
                               </object>
                             </property>
diff --git a/meson.build b/meson.build
index 15a2296..fd41366 100644
--- a/meson.build
+++ b/meson.build
@@ -37,7 +37,7 @@ gjs_console = gjs_dep.get_pkgconfig_variable('gjs_console')
 # Lets check whether the dependencies exist
 dependency('gio-2.0', version: '>= 2.43.4')
 dependency('glib-2.0', version: '>= 2.39.3')
-dependency('gtk4', version: '>= 3.99.3')
+dependency('gtk4', version: '>= 4.4.0')
 dependency('gstreamer-player-1.0', version: '>= 1.12')
 dependency('libhandy-4', version: '>= 1.0.0')
 dependency('gobject-introspection-1.0', version: '>= 1.31.6')
diff --git a/org.gnome.SoundRecorder.json b/org.gnome.SoundRecorder.json
index 4315535..088fd04 100644
--- a/org.gnome.SoundRecorder.json
+++ b/org.gnome.SoundRecorder.json
@@ -17,7 +17,29 @@
     ],
     "modules" : [
         {
-            "name" : "libhandy",
+            "name" : "libsass",
+            "buildsystem" : "meson",
+            "sources" : [
+                {
+                    "type" : "git",
+                    "url" : "https://github.com/lazka/libsass.git";,
+                    "branch" : "meson"
+                }
+            ]
+        },
+        {
+            "name" : "sassc",
+            "buildsystem" : "meson",
+            "sources" : [
+                {
+                    "type" : "git",
+                    "url" : "https://github.com/lazka/sassc.git";,
+                    "branch" : "meson"
+                }
+            ]
+        },
+        {
+            "name" : "libadwaita",
             "buildsystem" : "meson",
             "config-opts" : [
                 "-Dprofiling=false",
@@ -25,14 +47,13 @@
                 "-Dgtk_doc=false",
                 "-Dtests=false",
                 "-Dexamples=false",
-                "-Dvapi=false",
-                "-Dglade_catalog=disabled"
+                "-Dvapi=false"
             ],
             "sources" : [
                 {
                     "type" : "git",
-                    "url" : "https://gitlab.gnome.org/exalm/libhandy.git";,
-                    "branch" : "gtk4"
+                    "url" : "https://gitlab.gnome.org/GNOME/libadwaita.git";,
+                    "branch" : "main"
                 }
             ]
         },
diff --git a/src/application.js b/src/application.js
index b1012fa..bf72e07 100644
--- a/src/application.js
+++ b/src/application.js
@@ -18,7 +18,7 @@
 *
 */
 
-const { Gdk, Gio, GLib, GObject, Gst, Gtk, Handy } = imports.gi;
+const { Gdk, Gio, GLib, GObject, Gst, Gtk, Adw } = imports.gi;
 
 var RecordingsDir = Gio.file_new_for_path(GLib.build_filenamev([GLib.get_user_data_dir(), pkg.name]));
 var CacheDir = Gio.file_new_for_path(GLib.build_filenamev([GLib.get_user_cache_dir(), pkg.name]));
@@ -100,7 +100,7 @@ var Application = GObject.registerClass(class Application extends Gtk.Applicatio
         Gtk.IconTheme.get_for_display(display).add_resource_path('/org/gnome/SoundRecorder/icons/');
 
         this.set_resource_base_path('/org/gnome/SoundRecorder/');
-        Handy.init();
+        Adw.init();
         Gst.init(null);
 
         try {
diff --git a/src/main.js b/src/main.js
index 7e1c3c4..bb49874 100644
--- a/src/main.js
+++ b/src/main.js
@@ -38,7 +38,7 @@ pkg.require({
     'GstAudio': '1.0',
     'GstPlayer': '1.0',
     'GstPbutils': '1.0',
-    'Handy': '4',
+    'Adw': '1',
 });
 
 const { Application } = imports.application;
diff --git a/src/window.js b/src/window.js
index 4749846..67bac65 100644
--- a/src/window.js
+++ b/src/window.js
@@ -18,7 +18,7 @@
 *
 */
 
-const { Gio, GLib, GObject, Gst, GstPlayer, Gtk, Handy } = imports.gi;
+const { Gio, GLib, GObject, Gst, GstPlayer, Gtk, Adw } = imports.gi;
 
 const { Recorder } = imports.recorder;
 const { RecordingList } = imports.recordingList;
@@ -38,7 +38,7 @@ var Window = GObject.registerClass({
         'notificationRevealer', 'notificationMessage',
         'notificationUndoBtn', 'notificationCloseBtn',
     ],
-}, class Window extends Handy.ApplicationWindow {
+}, class Window extends Adw.ApplicationWindow {
 
     _init(params) {
         super._init(Object.assign({


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