mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-20 01:55:20 -04:00
add: DankColorSwatch component & settings sync
This commit is contained in:
@@ -161,19 +161,14 @@ Item {
|
||||
anchors.rightMargin: Theme.spacingS
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Rectangle {
|
||||
DankColorSwatch {
|
||||
id: triggerSwatch
|
||||
|
||||
property var swatchColor: root.optionColorMap[root.currentValue]
|
||||
|
||||
width: 16
|
||||
height: 16
|
||||
radius: 8
|
||||
color: swatchColor !== undefined ? swatchColor : "transparent"
|
||||
border.color: Theme.outline
|
||||
border.width: 1
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: swatchColor !== undefined
|
||||
visible: root.optionColorMap[root.currentValue] !== undefined
|
||||
swatchColor: visible ? root.optionColorMap[root.currentValue] : "transparent"
|
||||
}
|
||||
|
||||
DankIcon {
|
||||
@@ -473,17 +468,15 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Rectangle {
|
||||
DankColorSwatch {
|
||||
id: optionSwatch
|
||||
|
||||
width: 16
|
||||
height: 16
|
||||
radius: 8
|
||||
color: delegateRoot.swatchColor !== undefined ? delegateRoot.swatchColor : "transparent"
|
||||
border.color: delegateRoot.isCurrentValue ? Theme.primary : Theme.outline
|
||||
border.width: 1
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: delegateRoot.swatchColor !== undefined
|
||||
swatchColor: visible ? delegateRoot.swatchColor : "transparent"
|
||||
ringColor: delegateRoot.isCurrentValue ? Theme.primary : Theme.outline
|
||||
}
|
||||
|
||||
DankIcon {
|
||||
|
||||
Reference in New Issue
Block a user