|
54 | 54 | #define CURSOR_THEME_KEY "cursor-theme" |
55 | 55 | #define CURSOR_SIZE_KEY "cursor-size" |
56 | 56 | #define SCALING_FACTOR_KEY "window-scaling-factor" |
| 57 | +#define SCALING_FACTOR_QT_KEY "window-scaling-factor-qt-sync" |
57 | 58 |
|
58 | 59 | #define FONT_RENDER_SCHEMA "org.mate.font-rendering" |
59 | 60 | #define FONT_ANTIALIASING_KEY "antialiasing" |
@@ -525,14 +526,18 @@ scale_change_workarounds (MateXSettingsManager *manager, int new_scale) |
525 | 526 | /* This is only useful during the Initialization phase, so we guard against |
526 | 527 | * unnecessarily attempting to set it later. */ |
527 | 528 | if (!manager->priv->window_scale) { |
528 | | - /* Set env variables to properly scale QT applications */ |
529 | | - if (!update_user_env_variable ("QT_AUTO_SCREEN_SCALE_FACTOR", "0", &error)) { |
530 | | - g_warning ("There was a problem when setting QT_AUTO_SCREEN_SCALE_FACTOR=0: %s", error->message); |
531 | | - g_clear_error (&error); |
532 | | - } |
533 | | - if (!update_user_env_variable ("QT_SCALE_FACTOR", new_scale == 2 ? "2" : "1", &error)) { |
534 | | - g_warning ("There was a problem when setting QT_SCALE_FACTOR=%d: %s", new_scale, error->message); |
535 | | - g_clear_error (&error); |
| 529 | + GSettings *gsettings; |
| 530 | + gsettings = g_hash_table_lookup (manager->priv->gsettings, INTERFACE_SCHEMA); |
| 531 | + /* If enabled, set env variables to properly scale QT applications */ |
| 532 | + if (g_settings_get_boolean (gsettings, SCALING_FACTOR_QT_KEY)) { |
| 533 | + if (!update_user_env_variable ("QT_AUTO_SCREEN_SCALE_FACTOR", "0", &error)) { |
| 534 | + g_warning ("There was a problem when setting QT_AUTO_SCREEN_SCALE_FACTOR=0: %s", error->message); |
| 535 | + g_clear_error (&error); |
| 536 | + } |
| 537 | + if (!update_user_env_variable ("QT_SCALE_FACTOR", new_scale == 2 ? "2" : "1", &error)) { |
| 538 | + g_warning ("There was a problem when setting QT_SCALE_FACTOR=%d: %s", new_scale, error->message); |
| 539 | + g_clear_error (&error); |
| 540 | + } |
536 | 541 | } |
537 | 542 | } else { |
538 | 543 | /* Restart marco */ |
|
0 commit comments