[iagno/wip/arnaudb/hdydialog] Make the ThemesDialog a HdyDialog.



commit 9864be5958a6e701f11da577b79849f1487e0667
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sun Jul 28 14:00:37 2019 +0200

    Make the ThemesDialog a HdyDialog.

 data/ui/iagno-screens.ui | 4 ++--
 data/ui/iagno-themes.ui  | 3 +--
 data/ui/iagno.ui         | 4 ++--
 meson.build              | 1 +
 src/game-view.vala       | 2 +-
 src/game-window.vala     | 2 +-
 src/meson.build          | 4 +++-
 src/themes-dialog.vala   | 2 +-
 8 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/data/ui/iagno-screens.ui b/data/ui/iagno-screens.ui
index 07da0c1..9eb6468 100644
--- a/data/ui/iagno-screens.ui
+++ b/data/ui/iagno-screens.ui
@@ -26,8 +26,8 @@
     <property name="valign">fill</property>
     <property name="spacing">18</property>
     <property name="margin-bottom">25</property><!-- TODO better -->
-    <property name="height-request">263</property>
-    <property name="width-request">400</property>
+    <property name="height-request">268</property>  <!-- window should be 288px max for Purism Librem 5 
landscape, for 720px width -->
+    <property name="width-request">340</property>   <!-- window should be 360px max for Purism Librem 5 
portrait, for 648px height -->
     <child>
       <object class="GtkBox">
         <property name="orientation">vertical</property>
diff --git a/data/ui/iagno-themes.ui b/data/ui/iagno-themes.ui
index 1c4eea3..6d209bc 100644
--- a/data/ui/iagno-themes.ui
+++ b/data/ui/iagno-themes.ui
@@ -19,11 +19,10 @@
 -->
 <interface>
   <requires lib="gtk+" version="3.12"/>
-  <template class="ThemesDialog" parent="GtkDialog">
+  <template class="ThemesDialog" parent="HdyDialog">
     <property name="visible">False</property>
     <property name="width-request">333</property>
     <property name="height-request">450</property>
-    <property name="resizable">False</property>
     <!-- Translators: title of the theme dialog -->
     <property name="title" translatable="yes">Select Theme</property>
     <property name="border-width">0</property>
diff --git a/data/ui/iagno.ui b/data/ui/iagno.ui
index 3477d74..4971283 100644
--- a/data/ui/iagno.ui
+++ b/data/ui/iagno.ui
@@ -122,8 +122,8 @@
                 <property name="halign">center</property>
                 <property name="valign">center</property>
                 <property name="margin">25</property>
-                <property name="width-request">350</property>
-                <property name="height-request">350</property>
+                <property name="width-request">100</property>
+                <property name="height-request">100</property>
                 <property name="spacing">6</property>
               </object>
               <packing>
diff --git a/meson.build b/meson.build
index f9fa69d..d5c1b59 100644
--- a/meson.build
+++ b/meson.build
@@ -16,6 +16,7 @@ gio_dependency = dependency('gio-2.0', version: '>= 2.40.0')
 glib_dependency = dependency('glib-2.0', version: '>= 2.40.0')
 gsound_dependency = dependency('gsound', version: '>= 1.0.2')
 gtk_dependency = dependency('gtk+-3.0', version: '>= 3.24.0')
+hdy_dependency = dependency('libhandy-0.0', version: '>= 0.0.10')
 libm_dependency = cc.find_library('m', required: false) # some platforms do not have libm separated from libc
 posix_dependency = valac.find_library('posix')
 rsvg_dependency = dependency('librsvg-2.0', version: '>= 2.32.0')
diff --git a/src/game-view.vala b/src/game-view.vala
index a82b07d..afb67f6 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -171,7 +171,7 @@ private class GameView : Gtk.DrawingArea
                   | Gdk.EventMask.POINTER_MOTION_MASK
                   | Gdk.EventMask.ENTER_NOTIFY_MASK
                   | Gdk.EventMask.LEAVE_NOTIFY_MASK);
-        set_size_request (350, 350);
+        set_size_request (100, 100);
 
         init_mouse ();
     }
diff --git a/src/game-window.vala b/src/game-window.vala
index 9ae536c..c8927e3 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -96,7 +96,7 @@ private class GameWindow : ApplicationWindow
         {
             /* Translators: when configuring a new game, label of the blue Start button (with a mnemonic 
that appears pressing Alt) */
             Button _start_game_button = new Button.with_mnemonic (_("_Start Game"));
-            _start_game_button.width_request = 222;
+            _start_game_button.width_request = 122;
             _start_game_button.height_request = 60;
             _start_game_button.halign = Align.CENTER;
             _start_game_button.set_action_name ("ui.start-game");
diff --git a/src/meson.build b/src/meson.build
index 8835d4b..433a997 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -30,7 +30,8 @@ executable(meson.project_name(),
     ] + resources,
     install: true,
     c_args: [
-        '-include', 'config.h'
+        '-include', 'config.h',
+        '-D', 'HANDY_USE_UNSTABLE_API'
     ],
     vala_args: [
         '--target-glib', '2.44',
@@ -42,6 +43,7 @@ executable(meson.project_name(),
         glib_dependency,
         gsound_dependency,
         gtk_dependency,
+        hdy_dependency,
         libm_dependency,
         posix_dependency,
         rsvg_dependency
diff --git a/src/themes-dialog.vala b/src/themes-dialog.vala
index 7979f39..226327d 100644
--- a/src/themes-dialog.vala
+++ b/src/themes-dialog.vala
@@ -21,7 +21,7 @@
 using Gtk;
 
 [GtkTemplate (ui = "/org/gnome/Reversi/ui/themes.ui")]
-private class ThemesDialog : Dialog
+private class ThemesDialog : Hdy.Dialog
 {
     private const string PREFIX = "theme-";
 


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