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

How to change margin/padding #842

Open
robmifsud opened this issue May 2, 2024 · 2 comments
Open

How to change margin/padding #842

robmifsud opened this issue May 2, 2024 · 2 comments

Comments

@robmifsud
Copy link

I know there is a margin slider in the gui settings. However, I would like to know if it is possible to make the margin even larger and have different values for left/right margins and top/bottom. Thanks

@grahamhelton
Copy link

Found this thread when looking for the same thing. Implemented the change by making the following code changes:

diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml
index 424f0bd..8fc859d 100644
--- a/app/qml/ApplicationSettings.qml
+++ b/app/qml/ApplicationSettings.qml
@@ -98,8 +98,8 @@ QtObject {
 
     property real rbgShift: 0.0
 
-    property real _margin: 0.5
-    property real _frameMargin: 0.5
+    property real _margin: 5
+    property real _frameMargin: 10
 
     property real margin: Utils.lint(1.0, 20.0, _margin)
     property real frameMargin: Utils.lint(1.0, 50.0, _frameMargin)
diff --git a/app/qml/utils.js b/app/qml/utils.js
index 3cb5a67..2416802 100644
--- a/app/qml/utils.js
+++ b/app/qml/utils.js
@@ -28,9 +28,16 @@ function clamp(x, min, max) {
 }
 
 function lint(a, b, t) {
+    // Replace 20.0 and 50.0 to increase margin
+    if (b === 20.0) {
+        b = 100.0;
+    } else if (b === 50.0) {
+        b = 200.0;
+    }
     return (1 - t) * a + (t) * b;
 }
 
+
 function mix(c1, c2, alpha) {
     return Qt.rgba(c1.r * alpha + c2.r * (1-alpha),
                    c1.g * alpha + c2.g * (1-alpha),

Before:
image

After:

image

@grahamhelton
Copy link

Forked with changes: https://github.com/LowOrbitSecurity/cool-retro-term

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

2 participants