From bb59ef949b80f07661e0f703771a017bffdd96a3 Mon Sep 17 00:00:00 2001 From: ilarth Date: Fri, 6 Jan 2023 18:53:08 -0500 Subject: [PATCH 1/2] Parse popup size spinbox input The values need to be parsed back from display text otherwise the value becomes invalid on text entry. --- cqcb.plasma.webslice/contents/ui/ConfigGeneral.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cqcb.plasma.webslice/contents/ui/ConfigGeneral.qml b/cqcb.plasma.webslice/contents/ui/ConfigGeneral.qml index cd6b77f..2e61c82 100644 --- a/cqcb.plasma.webslice/contents/ui/ConfigGeneral.qml +++ b/cqcb.plasma.webslice/contents/ui/ConfigGeneral.qml @@ -173,6 +173,9 @@ Item { textFromValue: function(value, locale) { return i18nc('Abbreviation for pixels', '%1 px', value); } + valueFromText: function(text) { + return parseInt(text.split(' px')[0], 10) + } Layout.columnSpan: 1 } @@ -189,6 +192,9 @@ Item { textFromValue: function(value, locale) { return i18nc('Abbreviation for pixels', '%1 px', value); } + valueFromText: function(text) { + return parseInt(text.split(' px')[0], 10) + } Layout.columnSpan: 1 } From 9f2ac027505f88002ac72445b15df9d1094085b1 Mon Sep 17 00:00:00 2001 From: ilarth Date: Fri, 6 Jan 2023 19:07:27 -0500 Subject: [PATCH 2/2] Fix popup size on Plasma 5.26 --- cqcb.plasma.webslice/contents/ui/main.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cqcb.plasma.webslice/contents/ui/main.qml b/cqcb.plasma.webslice/contents/ui/main.qml index 9829fce..389eba6 100644 --- a/cqcb.plasma.webslice/contents/ui/main.qml +++ b/cqcb.plasma.webslice/contents/ui/main.qml @@ -123,6 +123,10 @@ Item { width: (displaySiteBehaviour) ? 0 : webPopupWidth height: (displaySiteBehaviour) ? 0 : webPopupHeight + + implicitWidth: width + implicitHeight: height + Layout.fillWidth: fillWidthAndHeight Layout.fillHeight: fillWidthAndHeight