aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-05-09 07:35:45 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-05-09 07:35:45 +0200
commitc4e49bf6cdae91be02caf428ae476e66cfdbe63e (patch)
tree86ac0bb071af05adcbce9413650a09c9ea33bf01
parent7004a8b66768d6d8f9b358fc6960dab9424514ad (diff)
parentc3820b965fe2476cd0e443d7ad41d20dfde81f8e (diff)
downloadarctica-greeter-c4e49bf6cdae91be02caf428ae476e66cfdbe63e.tar.gz
arctica-greeter-c4e49bf6cdae91be02caf428ae476e66cfdbe63e.tar.bz2
arctica-greeter-c4e49bf6cdae91be02caf428ae476e66cfdbe63e.zip
Merge branch 'tari01-pr/gdk-x11-display-cast'
Attributes GH PR #49: https://github.com/ArcticaProject/arctica-greeter/pull/49
-rw-r--r--src/idle-monitor.vala3
-rw-r--r--src/main-window.vala21
-rw-r--r--src/menubar.vala5
3 files changed, 17 insertions, 12 deletions
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;
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 ();
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 */