fix(icc): recreate failed controls without the night light and allow clearing a per-output temp

This commit is contained in:
bbedward
2026-09-15 10:39:52 -04:00
parent 9226251c9c
commit d55d3d1f66
2 changed files with 13 additions and 9 deletions
+1 -5
View File
@@ -539,14 +539,10 @@ func (m *Manager) addOutputControl(output *wlclient.Output) error {
}
func (m *Manager) recreateOutputControl(out *outputState) error {
m.configMutex.RLock()
enabled := m.config.Enabled
m.configMutex.RUnlock()
switch {
case m.connectionDead.Load():
return nil
case !enabled || !m.controlsInitialized:
case !m.needsControls() || !m.controlsInitialized:
return nil
case out.isVirtual:
return nil
@@ -530,7 +530,7 @@ StyledRect {
}
Column {
width: parent.width - 18 - Theme.spacingS - tempLabel.width - Theme.spacingS
width: parent.width - 18 - Theme.spacingS - tempLabel.width - Theme.spacingS - (tempResetButton.visible ? tempResetButton.width + Theme.spacingS : 0)
spacing: 1
anchors.verticalCenter: parent.verticalCenter
@@ -557,9 +557,17 @@ StyledRect {
anchors.verticalCenter: parent.verticalCenter
}
Item {
width: 1
height: 1
DankButton {
id: tempResetButton
text: ""
iconName: "close"
buttonHeight: 30
horizontalPadding: Theme.spacingXS
backgroundColor: "transparent"
textColor: Theme.error
visible: colorTempRow.currentTemp !== 0
anchors.verticalCenter: parent.verticalCenter
onClicked: ICCService.setOutputTemp(root.outputName, 0)
}
}