1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

Separate bar font scale

This commit is contained in:
bbedward
2025-10-07 08:29:48 -04:00
parent 7e49631912
commit 32d9aa0cf2
3 changed files with 103 additions and 3 deletions

View File

@@ -1065,6 +1065,97 @@ Item {
SettingsData.setDankBarBorderEnabled(checked)
}
}
Rectangle {
width: parent.width
height: 1
color: Theme.outline
opacity: 0.2
}
Rectangle {
width: parent.width
height: 60
radius: Theme.cornerRadius
color: "transparent"
Column {
anchors.left: parent.left
anchors.right: dankBarFontScaleControls.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: Theme.spacingM
anchors.rightMargin: Theme.spacingM
spacing: Theme.spacingXS
StyledText {
text: qsTr("DankBar Font Scale")
font.pixelSize: Theme.fontSizeMedium
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: qsTr("Scale DankBar font sizes independently")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
width: parent.width
}
}
Row {
id: dankBarFontScaleControls
width: 180
height: 36
anchors.right: parent.right
anchors.rightMargin: 0
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.spacingS
DankActionButton {
buttonSize: 32
iconName: "remove"
iconSize: Theme.iconSizeSmall
enabled: SettingsData.dankBarFontScale > 0.5
backgroundColor: Theme.surfaceContainerHigh
iconColor: Theme.surfaceText
onClicked: {
var newScale = Math.max(0.5, SettingsData.dankBarFontScale - 0.05)
SettingsData.setDankBarFontScale(newScale)
}
}
StyledRect {
width: 60
height: 32
radius: Theme.cornerRadius
color: Theme.surfaceContainerHigh
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2)
border.width: 0
StyledText {
anchors.centerIn: parent
text: (SettingsData.dankBarFontScale * 100).toFixed(0) + "%"
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Medium
color: Theme.surfaceText
}
}
DankActionButton {
buttonSize: 32
iconName: "add"
iconSize: Theme.iconSizeSmall
enabled: SettingsData.dankBarFontScale < 2.0
backgroundColor: Theme.surfaceContainerHigh
iconColor: Theme.surfaceText
onClicked: {
var newScale = Math.min(2.0, SettingsData.dankBarFontScale + 0.05)
SettingsData.setDankBarFontScale(newScale)
}
}
}
}
}
}