diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml index 350bc41..9ee4ecc 100644 --- a/app/qml/ApplicationSettings.qml +++ b/app/qml/ApplicationSettings.qml @@ -120,6 +120,9 @@ Item{ property var fontScalingList: [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5] property int fontScalingIndex: 5 + property real fontWidth: 1.0 + onFontWidthChanged: handleFontChanged(); + function setScalingIndex(newScaling){ fontScalingIndex = newScaling; fontScalingChanged(); diff --git a/app/qml/FontPixels.qml b/app/qml/FontPixels.qml index 4c0afbd..9f5143f 100644 --- a/app/qml/FontPixels.qml +++ b/app/qml/FontPixels.qml @@ -32,13 +32,6 @@ Item{ ListModel{ id: fontlist - ListElement{ - text: "Commodore PET 2Y (1977)" - source: "fonts/1977-commodore-pet/COMMODORE_PET_2y.ttf" - lineSpacing: 2 - pixelSize: 16 - baseScaling: 3.0 - } ListElement{ text: "Commodore PET (1977)" source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf" diff --git a/app/qml/FontScanlines.qml b/app/qml/FontScanlines.qml index 4c0afbd..9f5143f 100644 --- a/app/qml/FontScanlines.qml +++ b/app/qml/FontScanlines.qml @@ -32,13 +32,6 @@ Item{ ListModel{ id: fontlist - ListElement{ - text: "Commodore PET 2Y (1977)" - source: "fonts/1977-commodore-pet/COMMODORE_PET_2y.ttf" - lineSpacing: 2 - pixelSize: 16 - baseScaling: 3.0 - } ListElement{ text: "Commodore PET (1977)" source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf" diff --git a/app/qml/PreprocessedTerminal.qml b/app/qml/PreprocessedTerminal.qml index 5d6118a..4fcc4b1 100644 --- a/app/qml/PreprocessedTerminal.qml +++ b/app/qml/PreprocessedTerminal.qml @@ -104,7 +104,9 @@ Item{ font.pixelSize = pixelSize; font.family = fontLoader.name; - width = Qt.binding(function() {return Math.floor(terminalContainer.width / screenScaling);}); + var fontWidth = 1.0 / shadersettings.fontWidth; + + width = Qt.binding(function() {return Math.floor(fontWidth * terminalContainer.width / screenScaling);}); height = Qt.binding(function() {return Math.floor(terminalContainer.height / screenScaling);}); setLineSpacing(lineSpacing); diff --git a/app/qml/SettingsTerminalTab.qml b/app/qml/SettingsTerminalTab.qml index 22c6084..2b2dcc8 100644 --- a/app/qml/SettingsTerminalTab.qml +++ b/app/qml/SettingsTerminalTab.qml @@ -87,6 +87,21 @@ Tab{ text: shadersettings.fontScalingList[scalingChanger.value].toFixed(2) } } + Text{ text: qsTr("Font Width") } + RowLayout{ + Layout.fillWidth: true + Slider{ + Layout.fillWidth: true + id: widthChanger + onValueChanged: shadersettings.fontWidth = value; + value: shadersettings.fontWidth + stepSize: 0.05 + Component.onCompleted: minimumValue = 0.5 //Without this value gets set to 0.5 + } + Text{ + text: Math.round(widthChanger.value * 100) + "%" + } + } } } GroupBox{ diff --git a/app/qml/SettingsWindow.qml b/app/qml/SettingsWindow.qml index e7ab486..a121bcc 100644 --- a/app/qml/SettingsWindow.qml +++ b/app/qml/SettingsWindow.qml @@ -28,7 +28,7 @@ Window { id: settings_window title: qsTr("Settings") width: 640 - height: 450 + height: 480 property int tabmargins: 15