Skip to content

Commit 2fe4ceb

Browse files
Daemon: Use size request instead of default size (#2413)
Co-authored-by: Leonardo Lemos <[email protected]>
1 parent 32473f6 commit 2fe4ceb

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

daemon-gtk3/Window.vala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
*/
77

88
public class Gala.Daemon.Window : Gtk.Window {
9+
public int width { get; construct; }
10+
public int height { get; construct; }
911
public Gtk.Box content { get; construct; }
1012

1113
public Window (int width, int height) {
12-
Object (
13-
default_width: width,
14-
default_height: height
15-
);
14+
Object (width: width, height: height);
1615
}
1716

1817
class construct {
@@ -34,7 +33,9 @@ public class Gala.Daemon.Window : Gtk.Window {
3433
title = "MODAL";
3534
child = content = new Gtk.Box (HORIZONTAL, 0) {
3635
hexpand = true,
37-
vexpand = true
36+
vexpand = true,
37+
width_request = width,
38+
height_request = height
3839
};
3940

4041
set_visual (get_screen ().get_rgba_visual ());

daemon/DBus.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ public class Gala.Daemon.DBus : GLib.Object {
175175
y /= scale_factor;
176176
}
177177

178-
window.default_width = display_width;
179-
window.default_height = display_height;
178+
window.child.width_request = display_width;
179+
window.child.height_request = display_height;
180180
window.present ();
181181

182182
Gdk.Rectangle rect = {

0 commit comments

Comments
 (0)