Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Profiles should preserve font scaling and window dimensions #825

Open
kcbrown opened this issue Nov 18, 2023 · 0 comments
Open

Comments

@kcbrown
Copy link

kcbrown commented Nov 18, 2023

It's not uncommon for the use of a profile to include specific dimensional requirements. For instance, one may wish to emulate an 80x24 terminal like a VT-100. Or one might have other terminal size requirements.

In all of those cases, it's highly desirable for the profile to include the necessary attributes to maintain the dimensions and the font properties of the emulated terminal.

This code change accomplishes precisely that (note that it depends on the fix for #824 to properly change the window size once the profile has been loaded):

diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml
index 424f0bd..9f7737d 100644
--- a/app/qml/ApplicationSettings.qml
+++ b/app/qml/ApplicationSettings.qml
@@ -272,6 +272,9 @@ QtObject {
             "margin": _margin,
             "blinkingCursor": blinkingCursor,
             "frameMargin": _frameMargin,
+            "fontScaling": fontScaling,
+            "width": width,
+            "height": height,
         }
         return settings
     }
@@ -377,12 +380,17 @@ QtObject {
                 !== undefined ? settings.fontName : fontNames[rasterization]
         fontWidth = settings.fontWidth !== undefined ? settings.fontWidth : fontWidth
 
+        fontScaling = settings.fontScaling !== undefined ? settings.fontScaling : fontScaling
+        width = settings.width !== undefined ? settings.width : width
+        height = settings.height !== undefined ? settings.height : height
+
         _margin = settings.margin !== undefined ? settings.margin : _margin
         _frameMargin = settings.frameMargin !== undefined ? settings.frameMargin : _frameMargin
 
         blinkingCursor = settings.blinkingCursor !== undefined ? settings.blinkingCursor : blinkingCursor
 
         handleFontChanged()
+        initializedSettings()
     }
 
     function storeCustomProfiles() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant