[gnome-sudoku] Responsive layout: code cleanup



commit f1c17f421726d2fabcfd0ace49bea99c16193f67
Author: lajonss <l3n1 dupaw eu>
Date:   Sat Nov 21 04:45:02 2020 +0100

    Responsive layout: code cleanup

 meson.build           | 2 +-
 src/gnome-sudoku.vala | 9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index d188fd2b..96697a99 100644
--- a/meson.build
+++ b/meson.build
@@ -34,9 +34,9 @@ gio = dependency('gio-2.0', version: '>= @0@'.format(glib_version))
 glib = dependency('glib-2.0', version: '>= @0@'.format(glib_version))
 gtk = dependency('gtk+-3.0', version: '>= 3.24.0')
 json_glib = dependency('json-glib-1.0')
+libhandy = dependency('libhandy-1')
 qqwing = dependency('qqwing', version: '>= 1.3.4')
 threads = dependency('threads')
-libhandy = dependency('libhandy-1')
 
 config_include_dir = include_directories('.')
 
diff --git a/src/gnome-sudoku.vala b/src/gnome-sudoku.vala
index cfd5d628..623d811b 100644
--- a/src/gnome-sudoku.vala
+++ b/src/gnome-sudoku.vala
@@ -655,16 +655,9 @@ public class Sudoku : Gtk.Application
         var game_box_s = game_box.spacing;
         var controls_box_s = controls_box.spacing;
         var button_w = play_pause_button.width_request;
-        var button_h = play_pause_button.height_request;
 
-        var complementary_size = (int) (board_size + 2 * game_box_s + 2 * main_stack_m);
         var board_and_spacing = board_size + 3 * game_box_s + 2 * controls_box_s + 2 * main_stack_m;
-
-        frame_h.width_request = (int) (board_and_spacing + button_w);
-        frame_h.height_request = complementary_size;
-
-        frame_v.width_request = complementary_size;
-        frame_v.height_request =  (int) (board_and_spacing + button_h);
+        frame_h.width_request = board_and_spacing + button_w;
     }
 
     private bool draw_cb ()


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