From ea39ead64b1d936ca2baf7e3197e9f4aea5c6b9f Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 16 Mar 2021 16:12:28 +0100 Subject: [PATCH] feat(StatusSettingsLineButton): make some of the component's props configurable This helps with using this component in other places where the default settings for some UI related properties don't match otherwise. --- ui/shared/status/StatusSettingsLineButton.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/shared/status/StatusSettingsLineButton.qml b/ui/shared/status/StatusSettingsLineButton.qml index f9f2e285ca..11823487ca 100644 --- a/ui/shared/status/StatusSettingsLineButton.qml +++ b/ui/shared/status/StatusSettingsLineButton.qml @@ -10,9 +10,11 @@ Rectangle { property string currentValue property bool isBadge: false property string badgeText: "1" + property int badgeRadius: 9 property bool isEnabled: true signal clicked(bool checked) property bool isHovered: false + property int badgeSize: 18 id: root height: 52 @@ -66,10 +68,10 @@ Rectangle { anchors.right: root.isSwitch ? switchItem.left : caret.left anchors.rightMargin: Style.current.padding anchors.verticalCenter: textItem.verticalCenter - radius: 9 + radius: root.badgeRadius color: Style.current.blue - width: 18 - height: 18 + width: root.badgeSize + height: root.badgeSize Text { font.pixelSize: 12 color: Style.current.white