1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 22:12:50 -05:00

launcher v2: general styling fixes

- scrollbar
- footer alignment
- radii
- hover colors
This commit is contained in:
bbedward
2026-01-25 14:21:03 -05:00
parent 832807a217
commit 03fdf795e0
8 changed files with 49 additions and 24 deletions

View File

@@ -36,7 +36,7 @@ Rectangle {
readonly property int computedIconSize: Math.min(48, Math.max(32, width * 0.45))
radius: Theme.cornerRadius
color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryPressed : "transparent"
color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : "transparent"
Column {
anchors.centerIn: parent

View File

@@ -271,21 +271,32 @@ FocusScope {
anchors.fill: parent
visible: !editMode
Rectangle {
Item {
id: footerBar
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.leftMargin: root.parentModal?.borderWidth ?? 1
anchors.rightMargin: root.parentModal?.borderWidth ?? 1
anchors.bottomMargin: root.parentModal?.borderWidth ?? 1
readonly property bool showFooter: SettingsData.dankLauncherV2Size !== "micro" && SettingsData.dankLauncherV2ShowFooter
height: showFooter ? 32 : 0
height: showFooter ? 36 : 0
visible: showFooter
color: Theme.surfaceContainerHigh
radius: Theme.cornerRadius
clip: true
Rectangle {
anchors.fill: parent
anchors.topMargin: -Theme.cornerRadius
color: Theme.surfaceContainerHigh
radius: Theme.cornerRadius
}
Row {
id: modeButtonsRow
x: I18n.isRtl ? parent.width - width - Theme.spacingS : Theme.spacingS
y: (parent.height - height) / 2
anchors.left: parent.left
anchors.leftMargin: Theme.spacingXS
anchors.verticalCenter: parent.verticalCenter
layoutDirection: I18n.isRtl ? Qt.RightToLeft : Qt.LeftToRight
spacing: 2
Repeater {
@@ -316,28 +327,25 @@ FocusScope {
required property var modelData
required property int index
width: modeButtonMetrics.width + 14 + Theme.spacingXS + Theme.spacingM * 2 + Theme.spacingS
height: footerBar.height - 4
radius: Theme.cornerRadius - 2
width: buttonContent.width + Theme.spacingM * 2
height: 28
radius: Theme.cornerRadius
color: controller.searchMode === modelData.id || modeArea.containsMouse ? Theme.primaryContainer : "transparent"
TextMetrics {
id: modeButtonMetrics
font.pixelSize: Theme.fontSizeSmall
text: modelData.label
}
Row {
id: buttonContent
anchors.centerIn: parent
spacing: Theme.spacingXS
DankIcon {
anchors.verticalCenter: parent.verticalCenter
name: modelData.icon
size: 14
color: controller.searchMode === modelData.id ? Theme.primary : Theme.surfaceVariantText
}
StyledText {
anchors.verticalCenter: parent.verticalCenter
text: modelData.label
font.pixelSize: Theme.fontSizeSmall
color: controller.searchMode === modelData.id ? Theme.primary : Theme.surfaceText
@@ -357,23 +365,28 @@ FocusScope {
Row {
id: hintsRow
x: I18n.isRtl ? Theme.spacingS : parent.width - width - Theme.spacingS
y: (parent.height - height) / 2
anchors.right: parent.right
anchors.rightMargin: Theme.spacingS
anchors.verticalCenter: parent.verticalCenter
layoutDirection: I18n.isRtl ? Qt.RightToLeft : Qt.LeftToRight
spacing: Theme.spacingM
StyledText {
anchors.verticalCenter: parent.verticalCenter
text: "↑↓ " + I18n.tr("nav")
font.pixelSize: Theme.fontSizeSmall - 1
color: Theme.surfaceVariantText
}
StyledText {
anchors.verticalCenter: parent.verticalCenter
text: "↵ " + I18n.tr("open")
font.pixelSize: Theme.fontSizeSmall - 1
color: Theme.surfaceVariantText
}
StyledText {
anchors.verticalCenter: parent.verticalCenter
text: "Tab " + I18n.tr("actions")
font.pixelSize: Theme.fontSizeSmall - 1
color: Theme.surfaceVariantText
@@ -390,7 +403,6 @@ FocusScope {
anchors.leftMargin: Theme.spacingM
anchors.rightMargin: Theme.spacingM
anchors.topMargin: Theme.spacingM
anchors.bottomMargin: Theme.spacingXS
spacing: Theme.spacingXS
clip: false

View File

@@ -35,7 +35,7 @@ Rectangle {
width: parent?.width ?? 200
height: 52
color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryPressed : "transparent"
color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : "transparent"
radius: Theme.cornerRadius
MouseArea {

View File

@@ -159,6 +159,15 @@ Item {
contentHeight: sectionsColumn.height
clip: true
Component.onCompleted: {
verticalScrollBar.targetFlickable = mainFlickable;
verticalScrollBar.parent = root;
verticalScrollBar.z = 102;
verticalScrollBar.anchors.right = root.right;
verticalScrollBar.anchors.top = root.top;
verticalScrollBar.anchors.bottom = root.bottom;
}
Column {
id: sectionsColumn
width: parent.width

View File

@@ -19,7 +19,7 @@ Rectangle {
width: parent?.width ?? 200
height: 32
color: isSticky ? "transparent" : (hoverArea.containsMouse ? Theme.surfaceHover : "transparent")
radius: Theme.cornerRadius / 2
radius: Theme.cornerRadius
MouseArea {
id: hoverArea

View File

@@ -722,7 +722,7 @@ Item {
anchors.centerIn: parent
text: "DMS"
font.pixelSize: Theme.fontSizeSmall - 2
color: Theme.primaryText
color: Theme.primary
}
}
}

View File

@@ -5,6 +5,7 @@ import qs.Widgets
Flickable {
id: flickable
property alias verticalScrollBar: vbar
property real mouseWheelSpeed: 60
property real momentumVelocity: 0
property bool isMomentumActive: false

View File

@@ -5,12 +5,15 @@ import qs.Common
ScrollBar {
id: scrollbar
property var targetFlickable: null
readonly property var _target: targetFlickable ?? parent
property bool _scrollBarActive: false
property alias hideTimer: hideScrollBarTimer
property bool _isParentMoving: parent && (parent.moving || parent.flicking || parent.isMomentumActive)
property bool _isParentMoving: _target && (_target.moving || _target.flicking || _target.isMomentumActive)
property bool _shouldShow: pressed || hovered || active || _isParentMoving || _scrollBarActive
policy: (parent && parent.contentHeight > parent.height) ? ScrollBar.AsNeeded : ScrollBar.AlwaysOff
policy: (_target && _target.contentHeight > _target.height) ? ScrollBar.AsNeeded : ScrollBar.AlwaysOff
minimumSize: 0.08
implicitWidth: 10
interactive: true