aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arctica-greeter.vala8
-rw-r--r--src/settings.vala1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 3ff9a24..0bb4c8d 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -974,6 +974,14 @@ public class ArcticaGreeter : Object
debug ("Setting GDK_SCALE to: %d (scaling all UI elements by this factor)", scaling_factor_hidpi);
GLib.Environment.set_variable ("GDK_SCALE", "%d".printf (scaling_factor_hidpi), true);
+ /* Font scaling settings */
+ var scaling_factor_fonts = AGSettings.get_double (AGSettings.KEY_FONT_SCALING);
+ debug ("Scaling factor for fonts is: %f", scaling_factor_fonts);
+
+ /* Adjust GDK_SCALE / GDK_DPI_SCALE to our configured scaling factors. */
+ debug ("Setting GDK_DPI_SCALE to: %f (scaling fonts only by this factor)", scaling_factor_fonts);
+ GLib.Environment.set_variable ("GDK_DPI_SCALE", "%f".printf (scaling_factor_fonts), true);
+
/* Make nm-applet hide items the user does not have permissions to interact with */
Environment.set_variable ("NM_APPLET_HIDE_POLICY_ITEMS", "1", true);
diff --git a/src/settings.vala b/src/settings.vala
index c5d59ca..e4386a6 100644
--- a/src/settings.vala
+++ b/src/settings.vala
@@ -73,6 +73,7 @@ public class AGSettings : Object
public const string KEY_FLATBUTTON_BGCOLOR = "flatbutton-bgcolor";
public const string KEY_FLATBUTTON_BORDERCOLOR = "flatbutton-bordercolor";
public const string KEY_ENABLE_HIDPI = "enable-hidpi";
+ public const string KEY_FONT_SCALING = "font-scaling";
public const string KEY_MENUBAR_ALPHA = "menubar-alpha";
public const string KEY_HIDE_DEFAULT_XSESSION = "hide-default-xsession";
public const string KEY_HIDE_X11_SESSIONS = "hide-x11-sessions";