From be0468b7061f86402e0ce80d03bcf1f39b199f14 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 22 Sep 2018 18:01:45 -0700 Subject: QML UI: add settings for scale factor The visual feels backwards as the selected one is grayed out... Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/Settings.qml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml index 7c2beceaf..37c514803 100644 --- a/mobile-widgets/qml/Settings.qml +++ b/mobile-widgets/qml/Settings.qml @@ -245,6 +245,41 @@ Kirigami.ScrollablePage { PrefDisplay.theme = subsurfaceTheme.currentTheme } } + Kirigami.Heading { + text: qsTr("Scaling") + color: subsurfaceTheme.textColor + level: 4 + Layout.topMargin: Kirigami.Units.largeSpacing + Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 + Layout.columnSpan: 3 + } + Row { + Layout.preferredWidth: gridWidth * 0.8 + Layout.columnSpan: 3 + spacing: Kirigami.Units.largeSpacing + SsrfButton { + text: qsTr("smaller") + enabled: PrefDisplay.mobile_scale !== 0.85 + onClicked: { + PrefDisplay.mobile_scale = 0.85 + } + } + SsrfButton { + text: qsTr("regular") + enabled: PrefDisplay.mobile_scale !== 1.0 + onClicked: { + PrefDisplay.mobile_scale = 1.0 + } + } + SsrfButton { + text: qsTr("larger") + enabled: PrefDisplay.mobile_scale !== 1.15 + onClicked: { + PrefDisplay.mobile_scale = 1.15 + } + } + } + } Rectangle { -- cgit v1.2.3-70-g09d2