mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-04 20:48:29 -04:00
settings: restore lost geometric centering option
port 1.5
This commit is contained in:
@@ -181,22 +181,74 @@ Column {
|
|||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
spacing: Theme.spacingM
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
Row {
|
Item {
|
||||||
spacing: Theme.spacingM
|
width: parent.width
|
||||||
|
height: Math.max(headerRow.implicitHeight, centeringModeRow.implicitHeight)
|
||||||
|
LayoutMirroring.enabled: I18n.isRtl
|
||||||
|
LayoutMirroring.childrenInherit: true
|
||||||
|
|
||||||
DankIcon {
|
Row {
|
||||||
name: root.titleIcon
|
id: headerRow
|
||||||
size: Theme.iconSize
|
spacing: Theme.spacingM
|
||||||
color: Theme.primary
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
DankIcon {
|
||||||
|
name: root.titleIcon
|
||||||
|
size: Theme.iconSize
|
||||||
|
color: Theme.primary
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: root.title
|
||||||
|
font.pixelSize: Theme.fontSizeLarge
|
||||||
|
font.weight: Font.Medium
|
||||||
|
color: Theme.surfaceText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
Row {
|
||||||
text: root.title
|
id: centeringModeRow
|
||||||
font.pixelSize: Theme.fontSizeLarge
|
spacing: Theme.spacingXS
|
||||||
font.weight: Font.Medium
|
anchors.right: parent.right
|
||||||
color: Theme.surfaceText
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user