Index: applets/digital-clock/package/contents/config/main.xml =================================================================== --- applets/digital-clock/package/contents/config/main.xml +++ applets/digital-clock/package/contents/config/main.xml @@ -26,6 +26,10 @@ + + + 16 + false Index: applets/digital-clock/package/contents/ui/DigitalClock.qml =================================================================== --- applets/digital-clock/package/contents/ui/DigitalClock.qml +++ applets/digital-clock/package/contents/ui/DigitalClock.qml @@ -103,7 +103,12 @@ target: contentItem height: timeLabel.height + (main.showDate || timezoneLabel.visible ? 0.8 * timeLabel.height : 0) - width: Math.max(labelsGrid.width, timezoneLabel.paintedWidth, dateLabel.paintedWidth) + + width: if (main.showDate || main.showLocalTimezone) { + return Math.max(labelsGrid.width, timezoneLabel.paintedWidth, dateLabel.paintedWidth, timeLabel.paintedWidth) + } else { + return timeLabel.paintedWidth + } } PropertyChanges { @@ -123,8 +128,6 @@ height: sizehelper.height width: sizehelper.contentWidth - - font.pixelSize: timeLabel.height } PropertyChanges { @@ -210,8 +213,6 @@ height: sizehelper.height width: sizehelper.contentWidth - - fontSizeMode: Text.VerticalFit } PropertyChanges { @@ -469,7 +470,7 @@ family: plasmoid.configuration.fontFamily || theme.defaultFont.family weight: plasmoid.configuration.boldText ? Font.Bold : theme.defaultFont.weight italic: plasmoid.configuration.italicText - pixelSize: 1024 + pointSize: plasmoid.configuration.fontSize } minimumPixelSize: 1 Index: applets/digital-clock/package/contents/ui/configAppearance.qml =================================================================== --- applets/digital-clock/package/contents/ui/configAppearance.qml +++ applets/digital-clock/package/contents/ui/configAppearance.qml @@ -24,6 +24,7 @@ import QtQuick.Controls 1.0 as QtControls import QtQuick.Layouts 1.0 as QtLayouts import org.kde.plasma.calendar 2.0 as PlasmaCalendar +import org.kde.plasma.core 2.0 as PlasmaCore Item { id: appearancePage @@ -33,6 +34,7 @@ signal configurationChanged property string cfg_fontFamily + property alias cfg_fontSize: fontSize.value property alias cfg_boldText: boldCheckBox.checked property string cfg_timeFormat: "" property alias cfg_italicText: italicCheckBox.checked @@ -80,7 +82,7 @@ flat: true QtLayouts.GridLayout { // there's no FormLayout :( - columns: 2 + columns: 3 QtLayouts.Layout.fillWidth: true QtControls.Label { @@ -107,14 +109,22 @@ } } + QtControls.SpinBox { + id: fontSize + minimumValue: 8 + enabled: plasmoid.formFactor != PlasmaCore.Types.Vertical + } + // spacer, cannot do Qt.AlignTop on the font style label + rowSpan 3, otherwise looks odd Item { QtLayouts.Layout.fillWidth: true - QtLayouts.Layout.rowSpan: 2 + QtLayouts.Layout.rowSpan: 1 + QtLayouts.Layout.columnSpan: 3 } QtControls.CheckBox { id: boldCheckBox + QtLayouts.Layout.columnSpan: 3 text: i18n("Bold text") }