diff options
Diffstat (limited to 'src/dash-box.vala')
-rw-r--r-- | src/dash-box.vala | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/dash-box.vala b/src/dash-box.vala index 4d907db..52dd7d4 100644 --- a/src/dash-box.vala +++ b/src/dash-box.vala @@ -2,7 +2,7 @@ * * Copyright (C) 2011,2012 Canonical Ltd * Copyright (C) 2015 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> - * Copyright (C) 2023 Robert Tari + * Copyright (C) 2023-2025 Robert Tari * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -165,8 +165,10 @@ public class DashBox : Gtk.Box } else { - min = grid_size * GreeterList.DEFAULT_BOX_HEIGHT - GreeterList.BORDER * 2; - nat = grid_size * GreeterList.DEFAULT_BOX_HEIGHT - GreeterList.BORDER * 2; + var greeter = new ArcticaGreeter(); + + min = greeter.grid_size * GreeterList.DEFAULT_BOX_HEIGHT - (int)(GreeterList.BORDER * greeter.scaling_factor_widgets * 2); + nat = greeter.grid_size * GreeterList.DEFAULT_BOX_HEIGHT - (int)(GreeterList.BORDER * greeter.scaling_factor_widgets * 2); } } else @@ -184,8 +186,9 @@ public class DashBox : Gtk.Box public override void get_preferred_width (out int min, out int nat) { - min = grid_size * GreeterList.BOX_WIDTH - GreeterList.BORDER * 2; - nat = grid_size * GreeterList.BOX_WIDTH - GreeterList.BORDER * 2; + var greeter = new ArcticaGreeter(); + min = greeter.grid_size * GreeterList.BOX_WIDTH - (int)(GreeterList.BORDER * greeter.scaling_factor_widgets * 2); + nat = greeter.grid_size * GreeterList.BOX_WIDTH - (int)(GreeterList.BORDER * greeter.scaling_factor_widgets * 2); } public override bool draw (Cairo.Context c) @@ -200,8 +203,10 @@ public class DashBox : Gtk.Box c.restore (); } + var greeter = new ArcticaGreeter(); + /* Draw darker background with a rounded border */ - var box_r = 0.3 * grid_size; + var box_r = 0.3 * greeter.grid_size; int box_y = 0; int box_w; int box_h; @@ -232,7 +237,11 @@ public class DashBox : Gtk.Box } else { - c.set_source_rgba (0.1, 0.1, 0.1, 0.4); + string sBackGround = AGSettings.get_string (AGSettings.KEY_DASHBOX_BGCOLOR); + Gdk.RGBA cBackground = {1.0, 1.0, 1.0, 1.0}; + cBackground.parse (sBackGround); + double fOpacity = AGSettings.get_double (AGSettings.KEY_DASHBOX_OPACITY); + c.set_source_rgba (cBackground.red, cBackground.green, cBackground.blue, fOpacity); } c.fill_preserve (); |