Files
DankMaterialShell/quickshell/Modules/Dock/DockEditChrome.qml
T
bbedward 014c69b09a settings: tile color restyle and re-org, use materials own shift for
them towards theme
controlCenter: make a real grid, add numerous more tile varieties, add
icon size option
surfaces: fix elevation levels in general, and shift them down
settings: restyles and re-org
sliders: scale down universally
2026-09-18 14:32:55 -04:00

86 lines
2.5 KiB
QML

import QtQuick
import qs.Common
import qs.Services
import qs.Widgets
Rectangle {
id: root
LayoutMirroring.enabled: I18n.isRtl
LayoutMirroring.childrenInherit: true
property string title: ""
property bool canAdd: true
readonly property var focusTargets: [addButton, settingsButton, finishButton]
signal addRequested(var anchor)
signal settingsRequested
signal finished
implicitWidth: content.implicitWidth + Theme.spacingL * 2
implicitHeight: content.implicitHeight + Theme.spacingM * 2
radius: Theme.cornerRadiusXL
color: Theme.readableSurface
border.color: BlurService.borderColor
border.width: BlurService.borderWidth
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.AllButtons
onClicked: mouse => mouse.accepted = true
}
Row {
id: content
anchors.centerIn: parent
spacing: Theme.spacingM
StyledText {
anchors.verticalCenter: parent.verticalCenter
text: root.title
font.pixelSize: Theme.fontSizeLarge
font.weight: Theme.fontWeightMedium
color: Theme.surfaceText
elide: Text.ElideRight
}
DankButton {
id: addButton
anchors.verticalCenter: parent.verticalCenter
buttonHeight: Theme.buttonHeightS
iconName: "add"
text: I18n.tr("Add widget")
backgroundColor: Theme.secondaryContainer
textColor: Theme.onSecondaryContainer
enabled: root.canAdd
KeyNavigation.tab: settingsButton
KeyNavigation.backtab: finishButton
onClicked: root.addRequested(addButton)
}
DankActionButton {
id: settingsButton
anchors.verticalCenter: parent.verticalCenter
buttonSize: Theme.buttonHeightS
iconName: "settings"
Accessible.name: I18n.tr("Settings")
KeyNavigation.tab: finishButton
KeyNavigation.backtab: addButton
onClicked: root.settingsRequested()
}
DankButton {
id: finishButton
anchors.verticalCenter: parent.verticalCenter
buttonHeight: Theme.buttonHeightS
iconName: "check"
text: I18n.tr("Finish")
backgroundColor: Theme.primary
textColor: Theme.onPrimary
KeyNavigation.tab: addButton
KeyNavigation.backtab: settingsButton
onClicked: root.finished()
}
}
}