From 9b4d66446225aa5d5e6e089e01917408535cc362 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 8 May 2023 04:10:41 +0200 Subject: src/menubar.vala: Fix host name position --- src/menubar.vala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/menubar.vala b/src/menubar.vala index a53b461..5c6fa09 100644 --- a/src/menubar.vala +++ b/src/menubar.vala @@ -277,7 +277,10 @@ public class MenuBar : Gtk.MenuBar hostname_item.set_sensitive (false); - hostname_item.set_halign (Gtk.Align.END); + /* The below does not work, so for now we need to stick to "set_right_justified" + hostname_item.set_hexpand (true); + hostname_item.set_halign (Gtk.Align.END);*/ + hostname_item.set_right_justified (true); } /* Prevent dragging the window by the menubar */ -- cgit v1.2.3 From 886d9b70cbe8d948843d75f648f852c437c0a6e2 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 8 May 2023 04:11:37 +0200 Subject: src/main-window: Rewrite some deprecated Gtk.Alignments --- src/main-window.vala | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/main-window.vala b/src/main-window.vala index 32df287..5e500af 100644 --- a/src/main-window.vala +++ b/src/main-window.vala @@ -64,7 +64,6 @@ public class MainWindow : Gtk.Window /* Box for menubar shadow */ var menubox = new Gtk.EventBox (); - var menualign = new Gtk.Alignment (0.0f, 0.0f, 1.0f, 0.0f); var shadow_path = Path.build_filename (Config.PKGDATADIR, "shadow.png", null); var shadow_style = ""; @@ -92,16 +91,18 @@ public class MainWindow : Gtk.Window */ menubox.set_size_request (-1, MENUBAR_HEIGHT); menubox.show (); - menualign.show (); - menubox.add (menualign); login_box.add (menubox); - ArcticaGreeter.add_style_class (menualign); ArcticaGreeter.add_style_class (menubox); menubar = new MenuBar (background, accel_group); + menubar.set_hexpand (true); + menubar.set_vexpand (false); + menubar.set_halign (Gtk.Align.FILL); + menubar.set_valign (Gtk.Align.START); menubar.show (); - menualign.add (menubar); + menubox.add (menubar); ArcticaGreeter.add_style_class (menubar); + ArcticaGreeter.add_style_class (menubox); hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); hbox.expand = true; @@ -143,13 +144,13 @@ public class MainWindow : Gtk.Window align.add (back_button); - align = new Gtk.Alignment (0.0f, 0.5f, 0.0f, 1.0f); - align.show (); - hbox.add (align); - stack = new ListStack (); stack.show (); - align.add (stack); + stack.set_hexpand (false); + stack.set_vexpand (true); + stack.set_halign (Gtk.Align.CENTER); + stack.set_valign (Gtk.Align.FILL); + hbox.add (stack); add_user_list (); -- cgit v1.2.3 From c3820b965fe2476cd0e443d7ad41d20dfde81f8e Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 8 May 2023 04:13:00 +0200 Subject: src/idle-monitor.vala: Fix Gdk.Display -> Gdk.X11.Display casting fixes https://github.com/ArcticaProject/arctica-greeter/issues/48 --- src/idle-monitor.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/idle-monitor.vala b/src/idle-monitor.vala index b8e8963..72c21e1 100644 --- a/src/idle-monitor.vala +++ b/src/idle-monitor.vala @@ -83,7 +83,8 @@ public class IdleMonitor if (d is Gdk.X11.Display) { - display = d.get_xdisplay (); + Gdk.X11.Display pX11Display = (Gdk.X11.Display) d; + display = pX11Display.get_xdisplay (); } int sync_error_base; -- cgit v1.2.3