1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-15 10:12:07 -04: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", 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)
return
checkIncludeStatus() checkIncludeStatus()
WlrOutputService.requestState()
}) })
} }
@@ -974,17 +976,9 @@ 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
anchors.verticalCenter: parent.verticalCenter
StyledText {
id: includeFixButtonText
text: { text: {
if (root.fixingInclude) if (root.fixingInclude)
return I18n.tr("Fixing...") return I18n.tr("Fixing...")
@@ -992,22 +986,15 @@ Item {
return I18n.tr("Setup") return I18n.tr("Setup")
return I18n.tr("Fix Now") return I18n.tr("Fix Now")
} }
font.pixelSize: Theme.fontSizeSmall backgroundColor: Theme.primary
font.weight: Font.Medium textColor: Theme.primaryText
color: Theme.surface
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
enabled: !root.fixingInclude enabled: !root.fixingInclude
anchors.verticalCenter: parent.verticalCenter
onClicked: root.fixOutputsInclude() onClicked: root.fixOutputsInclude()
} }
} }
} }
} }
}
StyledRect { StyledRect {
width: parent.width width: parent.width

View File

@@ -328,40 +328,25 @@ 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
anchors.verticalCenter: parent.verticalCenter
StyledText {
id: fixButtonText
text: { text: {
if (KeybindsService.fixing) if (KeybindsService.fixing)
return I18n.tr("Fixing..."); return I18n.tr("Fixing...")
if (warningBox.showSetup) if (warningBox.showSetup)
return I18n.tr("Setup"); return I18n.tr("Setup")
return I18n.tr("Fix Now"); return I18n.tr("Fix Now")
} }
font.pixelSize: Theme.fontSizeSmall backgroundColor: Theme.primary
font.weight: Font.Medium textColor: Theme.primaryText
color: Theme.surface
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
enabled: !KeybindsService.fixing enabled: !KeybindsService.fixing
anchors.verticalCenter: parent.verticalCenter
onClicked: KeybindsService.fixDmsBindsInclude() onClicked: KeybindsService.fixDmsBindsInclude()
} }
} }
} }
} }
}
StyledRect { StyledRect {
width: Math.min(650, parent.width - Theme.spacingL * 2) width: Math.min(650, parent.width - Theme.spacingL * 2)