quickshell: open wallpaper dropdown on hover-switch like other menus
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
c87b40d528
commit
9447413fa1
6 changed files with 35 additions and 224 deletions
|
|
@ -3978,6 +3978,13 @@ in
|
|||
width: Theme.barWidth
|
||||
height: 24
|
||||
|
||||
function openWallDropdown() {
|
||||
bar.toggleDropdown(wallDropdown, function() {
|
||||
let pos = wallBtn.mapToItem(bar.contentItem, 0, wallBtn.height / 2);
|
||||
wallDropdown.dropdownY = pos.y;
|
||||
});
|
||||
}
|
||||
|
||||
SIcon {
|
||||
anchors.centerIn: parent
|
||||
text: "image"
|
||||
|
|
@ -3992,10 +3999,12 @@ in
|
|||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: bar.toggleDropdown(wallDropdown, function() {
|
||||
let pos = wallBtn.mapToItem(bar.contentItem, 0, wallBtn.height / 2);
|
||||
wallDropdown.dropdownY = pos.y;
|
||||
})
|
||||
onClicked: wallBtn.openWallDropdown()
|
||||
onEntered: {
|
||||
if (bar.activeDropdown) {
|
||||
if (bar.activeDropdown !== wallDropdown) wallBtn.openWallDropdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue