[gnome-2048] Set pre-defined minimum size for game window
- From: Juan R. Garcia Blanco <juanrgar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-2048] Set pre-defined minimum size for game window
- Date: Sun, 15 Feb 2015 21:03:26 +0000 (UTC)
commit 4eb74329c96e6da28c36574f1f5808d67fe47dff
Author: Juan R. GarcĂa Blanco <juanrgar gmail com>
Date: Sun Feb 15 22:02:20 2015 +0100
Set pre-defined minimum size for game window
Window default size is restored on application start-up and therefore it
cannot be used as minimum size;
See https://bugzilla.gnome.org/show_bug.cgi?id=744560
src/application.vala | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/application.vala b/src/application.vala
index 0e51d85..9410e5d 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -33,6 +33,9 @@ public class Application : Gtk.Application
private int _window_height;
private bool _window_maximized;
+ private int WINDOW_MINIMUM_SIZE_HEIGHT = 600;
+ private int WINDOW_MINIMUM_SIZE_WIDTH = 600;
+
private Game _game;
private const GLib.ActionEntry[] action_entries =
@@ -159,8 +162,8 @@ public class Application : Gtk.Application
_window.window_state_event.connect (window_state_event_cb);
Gdk.Geometry geom = Gdk.Geometry ();
- geom.min_height = _window.default_height;
- geom.min_width = _window.default_width;
+ geom.min_height = WINDOW_MINIMUM_SIZE_HEIGHT;
+ geom.min_width = WINDOW_MINIMUM_SIZE_WIDTH;
_window.set_geometry_hints (_window, geom, Gdk.WindowHints.MIN_SIZE);
_window.show_all ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]