aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2024-06-18 17:35:23 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2024-06-18 17:35:26 +0200
commite5040b08ff832a39853315970ef8987551fa1daa (patch)
tree52621ce8852a792eed680dad6dbd90ee724dbc9b
parentb98f5c0ccaa8981a773b28739402d572050cc730 (diff)
downloadarctica-greeter-e5040b08ff832a39853315970ef8987551fa1daa.tar.gz
arctica-greeter-e5040b08ff832a39853315970ef8987551fa1daa.tar.bz2
arctica-greeter-e5040b08ff832a39853315970ef8987551fa1daa.zip
src/: Resize and position magnifier window.
Place the magnifier window to the right part of this screen. This needs a follow up as we can now configure the position of the login prompt box via GSettings. Currently this only works for prompt box being on the left (default) part of the screen.
-rw-r--r--src/arctica-greeter.vala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 92165b3..c86acdc 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -1980,6 +1980,19 @@ public class DBusServer : Object
pMagnifierSocket.add_id (nId);
}
+ if ((this.pGreeter.pMagnifierWindow != null) && (pMagnifierSocket != null) && bActive)
+ {
+ /* resize and position the magnifier window to be in the right part of the screen */
+ debug ("Resizing and positioning Magnifier window.");
+ var pDisplay = this.pGreeter.main_window.get_display ();
+ var pMonitor = pDisplay.get_monitor_at_window (this.pGreeter.main_window.get_window ());
+ Gdk.Rectangle cRect = pMonitor.get_geometry ();
+ int magnifier_width = 2 * cRect.width / 5;
+ int magnifier_height = 2 * cRect.height / 5;
+ this.pGreeter.pMagnifierWindow.move (cRect.x + cRect.width - cRect.width / 10 - magnifier_width, cRect.y + cRect.height / 5 + cRect.height / 10);
+ this.pGreeter.pMagnifierWindow.resize (magnifier_width, magnifier_height);
+ }
+
this.pGreeter.pMagnifierWindow.visible = bActive;
}
}