1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-09 15:22:13 -04:00

displays: add disable snap option in settings

fixes #1438
This commit is contained in:
bbedward
2026-01-28 21:08:16 -05:00
parent 36b43f93a3
commit f27bffc387
4 changed files with 30 additions and 5 deletions

View File

@@ -348,7 +348,7 @@ Item {
}
Column {
width: parent.width - Theme.iconSize - Theme.spacingM - (displayFormatColumn.visible ? displayFormatColumn.width + Theme.spacingM : 0)
width: parent.width - Theme.iconSize - Theme.spacingM - (displayFormatColumn.visible ? displayFormatColumn.width + Theme.spacingM : 0) - (snapColumn.visible ? snapColumn.width + Theme.spacingM : 0)
spacing: Theme.spacingXS
anchors.verticalCenter: parent.verticalCenter
@@ -368,6 +368,29 @@ Item {
}
}
Column {
id: snapColumn
visible: true
spacing: Theme.spacingXS
anchors.verticalCenter: parent.verticalCenter
StyledText {
text: I18n.tr("Snap")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
anchors.horizontalCenter: parent.horizontalCenter
}
DankToggle {
id: snapToggle
checked: SettingsData.displaySnapToEdge
onToggled: checked => {
SettingsData.displaySnapToEdge = checked;
SettingsData.saveSettings();
}
}
}
Column {
id: displayFormatColumn
visible: !CompositorService.isDwl