1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

settings: restore lost geometric centering option

port 1.5
This commit is contained in:
bbedward
2026-07-10 11:11:52 -04:00
parent 494144a7c7
commit 0b69feaa1a
@@ -181,8 +181,17 @@ Column {
height: implicitHeight
spacing: Theme.spacingM
Item {
width: parent.width
height: Math.max(headerRow.implicitHeight, centeringModeRow.implicitHeight)
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
Row {
id: headerRow
spacing: Theme.spacingM
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
DankIcon {
name: root.titleIcon
@@ -200,6 +209,49 @@ Column {
}
}
Row {
id: centeringModeRow
spacing: Theme.spacingXS
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
visible: root.sectionId === "center"
DankActionButton {
id: indexCenterButton
buttonSize: 28
iconName: "format_list_numbered"
iconSize: 16
iconColor: SettingsData.centeringMode === "index" ? Theme.primary : Theme.outline
onClicked: {
SettingsData.set("centeringMode", "index");
}
onEntered: {
sharedTooltip.show(I18n.tr("Index Centering"), indexCenterButton, 0, 0, "bottom");
}
onExited: {
sharedTooltip.hide();
}
}
DankActionButton {
id: geometricCenterButton
buttonSize: 28
iconName: "center_focus_weak"
iconSize: 16
iconColor: SettingsData.centeringMode === "geometric" ? Theme.primary : Theme.outline
onClicked: {
SettingsData.set("centeringMode", "geometric");
}
onEntered: {
sharedTooltip.show(I18n.tr("Geometric Centering"), geometricCenterButton, 0, 0, "bottom");
}
onExited: {
sharedTooltip.hide();
}
}
}
}
Item {
id: reorderArea