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.
This commit is contained in:
Pascal Precht 2021-03-16 16:12:28 +01:00
parent 38bd5f1422
commit ea39ead64b
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 5 additions and 3 deletions

View File

@ -10,9 +10,11 @@ Rectangle {
property string currentValue property string currentValue
property bool isBadge: false property bool isBadge: false
property string badgeText: "1" property string badgeText: "1"
property int badgeRadius: 9
property bool isEnabled: true property bool isEnabled: true
signal clicked(bool checked) signal clicked(bool checked)
property bool isHovered: false property bool isHovered: false
property int badgeSize: 18
id: root id: root
height: 52 height: 52
@ -66,10 +68,10 @@ Rectangle {
anchors.right: root.isSwitch ? switchItem.left : caret.left anchors.right: root.isSwitch ? switchItem.left : caret.left
anchors.rightMargin: Style.current.padding anchors.rightMargin: Style.current.padding
anchors.verticalCenter: textItem.verticalCenter anchors.verticalCenter: textItem.verticalCenter
radius: 9 radius: root.badgeRadius
color: Style.current.blue color: Style.current.blue
width: 18 width: root.badgeSize
height: 18 height: root.badgeSize
Text { Text {
font.pixelSize: 12 font.pixelSize: 12
color: Style.current.white color: Style.current.white