mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-06 13:38:28 -04:00
settings: restore lost geometric centering option
port 1.5
This commit is contained in:
@@ -181,8 +181,17 @@ Column {
|
|||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
spacing: Theme.spacingM
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
|
Item {
|
||||||
|
width: parent.width
|
||||||
|
height: Math.max(headerRow.implicitHeight, centeringModeRow.implicitHeight)
|
||||||
|
LayoutMirroring.enabled: I18n.isRtl
|
||||||
|
LayoutMirroring.childrenInherit: true
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
id: headerRow
|
||||||
spacing: Theme.spacingM
|
spacing: Theme.spacingM
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: root.titleIcon
|
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 {
|
Item {
|
||||||
id: reorderArea
|
id: reorderArea
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user