diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml
index 7ebdba0..25a81ba 100644
--- a/package/contents/config/main.xml
+++ b/package/contents/config/main.xml
@@ -9,6 +9,7 @@
1.0
+
true
@@ -21,6 +22,7 @@
true
+
false
@@ -30,6 +32,9 @@
true
+
+ 26
+
-
-
\ No newline at end of file
+
+
diff --git a/package/contents/ui/config/ConfigGeneral.qml b/package/contents/ui/config/ConfigGeneral.qml
index 3c874ac..5240289 100644
--- a/package/contents/ui/config/ConfigGeneral.qml
+++ b/package/contents/ui/config/ConfigGeneral.qml
@@ -3,20 +3,23 @@ import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
Item {
-
+
property alias cfg_updateInterval: updateIntervalSpinBox.value
+
property alias cfg_showCpuMonitor: showCpuMonitor.checked
property alias cfg_showClock: showClock.checked
property alias cfg_showRamMonitor: showRamMonitor.checked
property alias cfg_memoryInPercent: memoryInPercent.checked
+
property alias cfg_verticalLayout: verticalLayout.checked
property alias cfg_enableHints: enableHints.checked
property alias cfg_enableShadows: enableShadows.checked
+ property alias cfg_fontScale: fontScale.value
GridLayout {
Layout.fillWidth: true
columns: 2
-
+
Label {
text: i18n('Update interval:')
Layout.alignment: Qt.AlignRight
@@ -28,50 +31,65 @@ Item {
minimumValue: 0.1
suffix: i18nc('Abbreviation for seconds', 's')
}
-
+
+ Label {
+ text: i18n('Font scale:')
+ Layout.alignment: Qt.AlignRight
+ }
+ SpinBox {
+ id: fontScale
+ minimumValue: 1
+ maximumValue: 100
+ suffix: i18nc('Percent', '%')
+ }
+
+ // Charts
+
Item {
width: 2
height: 10
Layout.columnSpan: 2
}
-
+
CheckBox {
id: showCpuMonitor
Layout.columnSpan: 2
text: i18n('Show CPU monitor')
}
-
+
CheckBox {
id: showClock
Layout.columnSpan: 2
text: i18n('Show clock')
enabled: showCpuMonitor.checked
}
-
+
CheckBox {
id: showRamMonitor
Layout.columnSpan: 2
text: i18n('Show RAM monitor')
}
-
+
CheckBox {
id: memoryInPercent
Layout.columnSpan: 2
text: i18n('Memory in percentage')
}
-
+
+ // Layout
+
Item {
width: 2
height: 10
Layout.columnSpan: 2
}
-
+
CheckBox {
id: verticalLayout
Layout.columnSpan: 2
text: i18n('Vertical layout')
}
-
+
CheckBox {
id: enableHints
Layout.columnSpan: 2
@@ -83,7 +101,6 @@ Item {
Layout.columnSpan: 2
text: i18n('Drop shadows')
}
-
}
-
+
}
diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml
index f4175f1..b98703f 100644
--- a/package/contents/ui/main.qml
+++ b/package/contents/ui/main.qml
@@ -37,6 +37,7 @@ Item {
property bool showRamMonitor: plasmoid.configuration.showRamMonitor
property bool memoryInPercent: plasmoid.configuration.memoryInPercent
property bool showMemoryInPercent: memoryInPercent
+ property double fontScale: (plasmoid.configuration.fontScale / 100)
property color warningColor: theme.neutralTextColor
property int graphGranularity: 20
@@ -47,7 +48,7 @@ Item {
property double parentHeight: parent === null ? 0 : parent.height
property double itemWidth: vertical ? ( verticalLayout ? parentWidth : (parentWidth - itemMargin) / 2 ) : ( verticalLayout ? (parentHeight - itemMargin) / 2 : parentHeight )
property double itemHeight: itemWidth
- property double fontPixelSize: itemHeight * 0.26
+ property double fontPixelSize: itemHeight * fontScale
property double widgetWidth: showCpuMonitor && showRamMonitor && !verticalLayout ? itemWidth*2 + itemMargin : itemWidth
property double widgetHeight: showCpuMonitor && showRamMonitor && verticalLayout ? itemWidth*2 + itemMargin : itemWidth