diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2024-12-28 10:40:46 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2024-12-28 10:44:06 +0100 |
commit | e1447b45d639444ba3696391fbb9d8a62dad0e13 (patch) | |
tree | e62902034a5f5c9a7f9f34daf887683347eab41c | |
parent | 4108d90e17a32ef90dd1369ae398631c5926ca43 (diff) | |
download | arctica-greeter-e1447b45d639444ba3696391fbb9d8a62dad0e13.tar.gz arctica-greeter-e1447b45d639444ba3696391fbb9d8a62dad0e13.tar.bz2 arctica-greeter-e1447b45d639444ba3696391fbb9d8a62dad0e13.zip |
src/main-window.vala: Make set_struts() a method without parameters and move previous set_struts() to _set_struts() (private method now).
-rw-r--r-- | src/main-window.vala | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main-window.vala b/src/main-window.vala index 370fa76..9535394 100644 --- a/src/main-window.vala +++ b/src/main-window.vala @@ -248,10 +248,16 @@ public class MainWindow : Gtk.Window resize (background.width, background.height); move (0, 0); move_to_monitor (primary_monitor); - set_struts (MenubarPositions.TOP, ArcticaGreeter.MENUBAR_HEIGHT); + set_struts (); } - public void set_struts (uint position, long menubar_size) + public void set_struts () + { + /* Substract the 5px shadow from the menubar height, so that indicators' menus render well */ + _set_struts (MenubarPositions.TOP, ArcticaGreeter.MENUBAR_HEIGHT); + } + + private void _set_struts (uint position, long menubar_size) { if (!get_realized()) { return; @@ -346,7 +352,7 @@ public class MainWindow : Gtk.Window debug ("MainWindow is %dx%d pixels", background.width, background.height); background.set_monitors (monitors); - set_struts (MenubarPositions.TOP, ArcticaGreeter.MENUBAR_HEIGHT); + set_struts (); if(do_resize) { |