1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

bar(clock): respect compact mode on vertical bar (#1222)

This commit is contained in:
sweenu
2026-01-02 21:46:33 +01:00
committed by GitHub
parent 6cff5f1146
commit ba28767492

View File

@@ -16,6 +16,8 @@ BasePill {
implicitWidth: root.isVerticalOrientation ? (root.widgetThickness - root.horizontalPadding * 2) : clockRow.implicitWidth implicitWidth: root.isVerticalOrientation ? (root.widgetThickness - root.horizontalPadding * 2) : clockRow.implicitWidth
implicitHeight: root.isVerticalOrientation ? clockColumn.implicitHeight : (root.widgetThickness - root.horizontalPadding * 2) implicitHeight: root.isVerticalOrientation ? clockColumn.implicitHeight : (root.widgetThickness - root.horizontalPadding * 2)
readonly property bool compact: widgetData?.clockCompactMode !== undefined ? widgetData.clockCompactMode : SettingsData.clockCompactMode
Column { Column {
id: clockColumn id: clockColumn
visible: root.isVerticalOrientation visible: root.isVerticalOrientation
@@ -106,6 +108,7 @@ BasePill {
width: parent.width width: parent.width
height: Theme.spacingM height: Theme.spacingM
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: !compact
Rectangle { Rectangle {
width: parent.width * 0.6 width: parent.width * 0.6
@@ -118,6 +121,7 @@ BasePill {
Row { Row {
spacing: 0 spacing: 0
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: !compact
StyledText { StyledText {
text: { text: {
@@ -151,6 +155,7 @@ BasePill {
Row { Row {
spacing: 0 spacing: 0
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: !compact
StyledText { StyledText {
text: { text: {
@@ -204,7 +209,7 @@ BasePill {
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
color: Theme.outlineButton color: Theme.outlineButton
anchors.baseline: dateText.baseline anchors.baseline: dateText.baseline
visible: !(widgetData?.clockCompactMode !== undefined ? widgetData.clockCompactMode : SettingsData.clockCompactMode) visible: !compact
} }
StyledText { StyledText {
@@ -218,7 +223,7 @@ BasePill {
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale) font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
color: Theme.widgetTextColor color: Theme.widgetTextColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: !(widgetData?.clockCompactMode !== undefined ? widgetData.clockCompactMode : SettingsData.clockCompactMode) visible: !compact
} }
} }