mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-17 00: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 {
|
func (m *Manager) recreateOutputControl(out *outputState) error {
|
||||||
m.configMutex.RLock()
|
|
||||||
enabled := m.config.Enabled
|
|
||||||
m.configMutex.RUnlock()
|
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case m.connectionDead.Load():
|
case m.connectionDead.Load():
|
||||||
return nil
|
return nil
|
||||||
case !enabled || !m.controlsInitialized:
|
case !m.needsControls() || !m.controlsInitialized:
|
||||||
return nil
|
return nil
|
||||||
case out.isVirtual:
|
case out.isVirtual:
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ StyledRect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
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
|
spacing: 1
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
@@ -557,9 +557,17 @@ StyledRect {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
DankButton {
|
||||||
width: 1
|
id: tempResetButton
|
||||||
height: 1
|
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