mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
fix gui
This commit is contained in:
@@ -241,7 +241,7 @@ Item {
|
|||||||
configFile: configDir + "/hypr/hyprland.conf",
|
configFile: configDir + "/hypr/hyprland.conf",
|
||||||
outputsFile: configDir + "/hypr/dms/outputs.conf",
|
outputsFile: configDir + "/hypr/dms/outputs.conf",
|
||||||
grepPattern: 'source.*dms/outputs.conf',
|
grepPattern: 'source.*dms/outputs.conf',
|
||||||
includeLine: "source = ~/.config/hypr/dms/outputs.conf"
|
includeLine: "source = ./dms/outputs.conf"
|
||||||
}
|
}
|
||||||
case "dwl":
|
case "dwl":
|
||||||
return {
|
return {
|
||||||
@@ -297,8 +297,10 @@ Item {
|
|||||||
`echo '${paths.includeLine}' >> "${paths.configFile}"; fi`
|
`echo '${paths.includeLine}' >> "${paths.configFile}"; fi`
|
||||||
], (output, exitCode) => {
|
], (output, exitCode) => {
|
||||||
fixingInclude = false
|
fixingInclude = false
|
||||||
if (exitCode === 0)
|
if (exitCode !== 0)
|
||||||
checkIncludeStatus()
|
return
|
||||||
|
checkIncludeStatus()
|
||||||
|
WlrOutputService.requestState()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -974,36 +976,21 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
DankButton {
|
||||||
id: includeFixButton
|
id: includeFixButton
|
||||||
width: includeFixButtonText.implicitWidth + Theme.spacingL * 2
|
|
||||||
height: Math.round(Theme.fontSizeMedium * 2.5)
|
|
||||||
radius: Theme.cornerRadius
|
|
||||||
visible: includeWarningBox.showError || includeWarningBox.showSetup
|
visible: includeWarningBox.showError || includeWarningBox.showSetup
|
||||||
color: root.fixingInclude ? Theme.withAlpha(Theme.error, 0.6) : Theme.error
|
text: {
|
||||||
|
if (root.fixingInclude)
|
||||||
|
return I18n.tr("Fixing...")
|
||||||
|
if (includeWarningBox.showSetup)
|
||||||
|
return I18n.tr("Setup")
|
||||||
|
return I18n.tr("Fix Now")
|
||||||
|
}
|
||||||
|
backgroundColor: Theme.primary
|
||||||
|
textColor: Theme.primaryText
|
||||||
|
enabled: !root.fixingInclude
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: root.fixOutputsInclude()
|
||||||
StyledText {
|
|
||||||
id: includeFixButtonText
|
|
||||||
text: {
|
|
||||||
if (root.fixingInclude)
|
|
||||||
return I18n.tr("Fixing...")
|
|
||||||
if (includeWarningBox.showSetup)
|
|
||||||
return I18n.tr("Setup")
|
|
||||||
return I18n.tr("Fix Now")
|
|
||||||
}
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
font.weight: Font.Medium
|
|
||||||
color: Theme.surface
|
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
enabled: !root.fixingInclude
|
|
||||||
onClicked: root.fixOutputsInclude()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -328,36 +328,21 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
DankButton {
|
||||||
id: fixButton
|
id: fixButton
|
||||||
width: fixButtonText.implicitWidth + Theme.spacingL * 2
|
|
||||||
height: Math.round(Theme.fontSizeMedium * 2.5)
|
|
||||||
radius: Theme.cornerRadius
|
|
||||||
visible: warningBox.showError || warningBox.showSetup
|
visible: warningBox.showError || warningBox.showSetup
|
||||||
color: KeybindsService.fixing ? Theme.withAlpha(Theme.error, 0.6) : Theme.error
|
text: {
|
||||||
|
if (KeybindsService.fixing)
|
||||||
|
return I18n.tr("Fixing...")
|
||||||
|
if (warningBox.showSetup)
|
||||||
|
return I18n.tr("Setup")
|
||||||
|
return I18n.tr("Fix Now")
|
||||||
|
}
|
||||||
|
backgroundColor: Theme.primary
|
||||||
|
textColor: Theme.primaryText
|
||||||
|
enabled: !KeybindsService.fixing
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: KeybindsService.fixDmsBindsInclude()
|
||||||
StyledText {
|
|
||||||
id: fixButtonText
|
|
||||||
text: {
|
|
||||||
if (KeybindsService.fixing)
|
|
||||||
return I18n.tr("Fixing...");
|
|
||||||
if (warningBox.showSetup)
|
|
||||||
return I18n.tr("Setup");
|
|
||||||
return I18n.tr("Fix Now");
|
|
||||||
}
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
font.weight: Font.Medium
|
|
||||||
color: Theme.surface
|
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
enabled: !KeybindsService.fixing
|
|
||||||
onClicked: KeybindsService.fixDmsBindsInclude()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user