[lightsoff] Reduce border and minimum size to fit on Librem5
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lightsoff] Reduce border and minimum size to fit on Librem5
- Date: Thu, 11 Oct 2018 16:04:09 +0000 (UTC)
commit c21326abc7e0ed313684a3f0af22752dbbbcf23e
Author: Robert Roth <robert roth off gmail com>
Date: Thu Oct 11 19:03:44 2018 +0300
Reduce border and minimum size to fit on Librem5
src/board-view-gtk.vala | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/board-view-gtk.vala b/src/board-view-gtk.vala
index 5082474..24554ad 100644
--- a/src/board-view-gtk.vala
+++ b/src/board-view-gtk.vala
@@ -14,7 +14,7 @@ public class BoardViewGtk : Gtk.Grid, BoardView
private Gtk.ToggleButton[,] lights;
public bool playable = true;
-
+ private const int MIN_TOGGLE_SIZE = 48;
private int _moves = 0;
public int moves
{
@@ -27,11 +27,11 @@ public class BoardViewGtk : Gtk.Grid, BoardView
get_style_context ().add_class ("grid");
row_homogeneous = true;
column_homogeneous = true;
- border_width = 4;
+ border_width = 2;
row_spacing = 2;
column_spacing = 2;
- set_size_request (size * 72, size * 72);
+ set_size_request (size * MIN_TOGGLE_SIZE, size * MIN_TOGGLE_SIZE);
puzzle_generator = new PuzzleGenerator (size);
lights = new Gtk.ToggleButton [size, size];
@@ -108,4 +108,4 @@ public class BoardViewGtk : Gtk.Grid, BoardView
_moves += 1;
}
-}
\ No newline at end of file
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]