quickshell: fix tray menu, improve popup styling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d63693e87a
commit
9dc4067a59
1 changed files with 13 additions and 11 deletions
|
|
@ -634,17 +634,17 @@ in
|
|||
|
||||
// Tray toggle button
|
||||
Item {
|
||||
id: trayToggle
|
||||
Layout.preferredWidth: 28
|
||||
Layout.preferredHeight: 30
|
||||
Layout.rightMargin: 6
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "\ue0b2"
|
||||
text: trayPopup.visible ? "\u25b6" : "\u25c0"
|
||||
color: "#${c.base05}"
|
||||
font.family: "FiraMono Nerd Font"
|
||||
font.pixelSize: 13
|
||||
textFormat: Text.PlainText
|
||||
font.pixelSize: 10
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
@ -657,19 +657,21 @@ in
|
|||
PopupWindow {
|
||||
id: trayPopup
|
||||
anchor.window: bar
|
||||
anchor.rect.x: bar.width - 220
|
||||
anchor.rect.y: bar.height
|
||||
anchor.adjustment: PopupAdjustment.None
|
||||
visible: false
|
||||
color: "#${c.base00}"
|
||||
implicitWidth: trayRow.width + 24
|
||||
implicitHeight: 40
|
||||
color: "transparent"
|
||||
implicitWidth: trayContent.width + 2
|
||||
implicitHeight: trayContent.height + 2
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
id: trayContent
|
||||
anchors.centerIn: parent
|
||||
width: trayRow.width + 24
|
||||
height: 36
|
||||
color: "#${c.base00}"
|
||||
border.color: "#${c.base03}"
|
||||
border.width: 1
|
||||
radius: 8
|
||||
radius: 6
|
||||
|
||||
RowLayout {
|
||||
id: trayRow
|
||||
|
|
@ -691,7 +693,7 @@ in
|
|||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onClicked: (event) => {
|
||||
if (event.button === Qt.RightButton && parent.modelData.hasMenu) {
|
||||
parent.modelData.menu.open();
|
||||
parent.modelData.display(trayPopup, mouse.x, mouse.y);
|
||||
} else {
|
||||
parent.modelData.activate();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue