1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00
This commit is contained in:
bbedward
2025-12-15 16:30:35 -05:00
parent 9e8c93bfd7
commit 9673078a75
2 changed files with 29 additions and 57 deletions

View File

@@ -241,7 +241,7 @@ Item {
configFile: configDir + "/hypr/hyprland.conf",
outputsFile: configDir + "/hypr/dms/outputs.conf",
grepPattern: 'source.*dms/outputs.conf',
includeLine: "source = ~/.config/hypr/dms/outputs.conf"
includeLine: "source = ./dms/outputs.conf"
}
case "dwl":
return {
@@ -297,8 +297,10 @@ Item {
`echo '${paths.includeLine}' >> "${paths.configFile}"; fi`
], (output, exitCode) => {
fixingInclude = false
if (exitCode === 0)
checkIncludeStatus()
if (exitCode !== 0)
return
checkIncludeStatus()
WlrOutputService.requestState()
})
}
@@ -974,36 +976,21 @@ Item {
}
}
Rectangle {
DankButton {
id: includeFixButton
width: includeFixButtonText.implicitWidth + Theme.spacingL * 2
height: Math.round(Theme.fontSizeMedium * 2.5)
radius: Theme.cornerRadius
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
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()
}
onClicked: root.fixOutputsInclude()
}
}
}

View File

@@ -328,36 +328,21 @@ Item {
}
}
Rectangle {
DankButton {
id: fixButton
width: fixButtonText.implicitWidth + Theme.spacingL * 2
height: Math.round(Theme.fontSizeMedium * 2.5)
radius: Theme.cornerRadius
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
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()
}
onClicked: KeybindsService.fixDmsBindsInclude()
}
}
}