mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-14 23:34:01 -04:00
fix(icc): recreate failed controls without the night light and allow clearing a per-output temp
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user