Skip to content

Commit

Permalink
fix: settings crash due to binding on buttons with custom colors
Browse files Browse the repository at this point in the history
  • Loading branch information
luisbocanegra committed Sep 26, 2024
1 parent 4a5adac commit 3aa8c07
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package/contents/ui/components/FormBorder.qml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Kirigami.FormLayout {
Binding {
target: enabledCheckbox
property: "Kirigami.Theme.textColor"
value: Kirigami.Theme.neutralTextColor
value: borderRoot.Kirigami.Theme.neutralTextColor
when: !enabledCheckbox.checked
}
Kirigami.Theme.inherit: false
Expand Down
2 changes: 1 addition & 1 deletion package/contents/ui/components/FormColors.qml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Kirigami.FormLayout {
Binding {
target: enabledCheckbox
property: "Kirigami.Theme.textColor"
value: Kirigami.Theme.neutralTextColor
value: colorRoot.Kirigami.Theme.neutralTextColor
when: !enabledCheckbox.checked
}
Kirigami.Theme.inherit: false
Expand Down
2 changes: 1 addition & 1 deletion package/contents/ui/components/FormShadow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Kirigami.FormLayout {
Binding {
target: enabledCheckbox
property: "Kirigami.Theme.textColor"
value: Kirigami.Theme.neutralTextColor
value: shadowRoot.Kirigami.Theme.neutralTextColor
when: !enabledCheckbox.checked
}
Kirigami.Theme.inherit: false
Expand Down
4 changes: 2 additions & 2 deletions package/contents/ui/components/FormShape.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Kirigami.FormLayout {
Binding {
target: radiusEnabledCheckbox
property: "Kirigami.Theme.textColor"
value: Kirigami.Theme.neutralTextColor
value: shapeRoot.Kirigami.Theme.neutralTextColor
when: !radiusEnabledCheckbox.checked
}
Kirigami.Theme.inherit: false
Expand Down Expand Up @@ -107,7 +107,7 @@ Kirigami.FormLayout {
Binding {
target: marginEnabledCheckbox
property: "Kirigami.Theme.textColor"
value: Kirigami.Theme.neutralTextColor
value: shapeRoot.Kirigami.Theme.neutralTextColor
when: !marginEnabledCheckbox.checked
}
Kirigami.Theme.inherit: false
Expand Down
3 changes: 2 additions & 1 deletion package/contents/ui/components/Header.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.kde.plasma.plasmoid
import org.kde.kirigami as Kirigami

RowLayout {
id: root
property alias isEnabled: isEnabledCheckbox.checked
RowLayout {
Layout.alignment: Qt.AlignRight
Expand All @@ -17,7 +18,7 @@ RowLayout {
Binding {
target: isEnabledCheckbox
property: "Kirigami.Theme.textColor"
value: Kirigami.Theme.neutralTextColor
value: root.Kirigami.Theme.neutralTextColor
when: !isEnabledCheckbox.checked
}
Kirigami.Theme.inherit: false
Expand Down
2 changes: 1 addition & 1 deletion package/contents/ui/components/ValueMouseControl.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Item {

Rectangle {
anchors.fill: parent
Kirigami.Theme.colorSet: Kirigami.Theme.Button
Kirigami.Theme.colorSet: root.Kirigami.Theme.Button
Kirigami.Theme.inherit: false
color: Kirigami.Theme.backgroundColor
opacity: 1
Expand Down
4 changes: 2 additions & 2 deletions package/contents/ui/components/WidgetCardCheck.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Kirigami.AbstractCard {
Rectangle {
visible: widget.inTray
color: Kirigami.Theme.highlightColor
Kirigami.Theme.colorSet: Kirigami.Theme["Selection"]
Kirigami.Theme.colorSet: root.Kirigami.Theme["Selection"]
radius: parent.height / 2
width: label.width + 12
height: label.height + 2
Expand All @@ -33,7 +33,7 @@ Kirigami.AbstractCard {
id: label
text: "Tray"
color: Kirigami.Theme.textColor
Kirigami.Theme.colorSet: Kirigami.Theme["Selection"]
Kirigami.Theme.colorSet: root.Kirigami.Theme["Selection"]
Kirigami.Theme.inherit: false
}
}
Expand Down
4 changes: 2 additions & 2 deletions package/contents/ui/components/WidgetCardConfig.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Kirigami.AbstractCard {
Rectangle {
visible: widget.inTray
color: Kirigami.Theme.highlightColor
Kirigami.Theme.colorSet: Kirigami.Theme["Selection"]
Kirigami.Theme.colorSet: root.Kirigami.Theme["Selection"]
radius: parent.height / 2
width: label.width + 12
height: label.height + 2
Expand All @@ -37,7 +37,7 @@ Kirigami.AbstractCard {
id: label
text: "Tray"
color: Kirigami.Theme.textColor
Kirigami.Theme.colorSet: Kirigami.Theme["Selection"]
Kirigami.Theme.colorSet: root.Kirigami.Theme["Selection"]
Kirigami.Theme.inherit: false
}
}
Expand Down

0 comments on commit 3aa8c07

Please sign in to comment.