NIconButton: better disabled state

This commit is contained in:
LemmyCook 2025-08-31 14:44:22 -04:00
parent 0f5bbb961d
commit 40579e1b80
2 changed files with 7 additions and 5 deletions

View file

@ -87,13 +87,14 @@ NBox {
colorFg: Color.mOnPrimary
colorBgHover: Color.mSecondary
colorFgHover: Color.mOnSecondary
enabled: comboBox.selectedKey !== ""
enabled: comboBox.currentKey !== ""
tooltipText: "Add widget to this section"
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: Style.marginS * scaling
onClicked: {
if (comboBox.currentKey !== "") {
addWidget(comboBox.currentKey, sectionName.toLowerCase())
comboBox.currentKey = "battery"
comboBox.currentKey = ""
}
}
}