expandable dialogs for color scheme, fonts and scheduling modes

This commit is contained in:
2026-09-30 14:16:16 +02:00
parent 731b323670
commit 23d2b31c0a
20 changed files with 1325 additions and 662 deletions
+15 -3
View File
@@ -13,15 +13,21 @@ Item {
property bool acceptAllowed: true
required property string acceptLabel
required property Component content
property bool first: false
required property string header
property int horizontalContentMargin
required property string icon
property string icon
property alias iconLabel: openButton.iconLabel
required property string label
property bool last: false
property bool open
property real openHeight: Math.min(rootParent.height * 0.8, 600)
property real openWidth: Math.min(rootParent.width * 0.8, 400)
required property Item rootParent
property alias rowButton: openButton
property bool separateContent
required property string settingAnchor
property string subtext: ""
signal accepted
signal cancelled
@@ -56,6 +62,7 @@ Item {
enabled: false
hoverEnabled: enabled
parent: root.open ? root.rootParent : root
preventStealing: true
onClicked: root.open = false
}
@@ -75,7 +82,8 @@ Item {
backdrop.enabled: true
dialogBg.bottomLeftRadius: Tokens.rounding.largeIncreased
dialogBg.bottomRightRadius: Tokens.rounding.largeIncreased
dialogBg.radius: Tokens.rounding.largeIncreased
dialogBg.topLeftRadius: Tokens.rounding.largeIncreased
dialogBg.topRightRadius: Tokens.rounding.largeIncreased
dialogContent.opacity: 1
dialogWrapper.height: root.openHeight
dialogWrapper.width: root.openWidth
@@ -103,7 +111,7 @@ Item {
}
Anim {
properties: "opacity,radius,bottomLeftRadius,bottomRightRadius"
properties: "opacity,topLeftRadius,topRightRadius,bottomLeftRadius,bottomRightRadius"
type: Anim.DefaultEffects
}
@@ -166,6 +174,8 @@ Item {
opacity: 0
sourceComponent: MouseArea {
preventStealing: true
onWheel: event => event.accepted = true
ColumnLayout {
@@ -216,6 +226,7 @@ Item {
TextButton {
horizontalPadding: Tokens.padding.largeIncreased
isRound: true
stateLayer.preventStealing: true
text: qsTr("Cancel")
type: TextButton.Text
verticalPadding: Tokens.padding.small
@@ -230,6 +241,7 @@ Item {
enabled: root.acceptAllowed
horizontalPadding: Tokens.padding.largeIncreased
isRound: true
stateLayer.preventStealing: true
text: root.acceptLabel
type: TextButton.Text
verticalPadding: Tokens.padding.small