mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-05 06:59:50 -05:00
Initial commit
This commit is contained in:
commit
05cd51b54e
148 changed files with 10112 additions and 0 deletions
41
.stversions/bar/SysTray~20250509-203448.qml
Normal file
41
.stversions/bar/SysTray~20250509-203448.qml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Services.SystemTray
|
||||
import "../widgets" as Widgets
|
||||
import ".."
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
required property var bar
|
||||
spacing: 10
|
||||
visible: SystemTray.items.values.length > 0
|
||||
|
||||
Repeater {
|
||||
model: SystemTray.items
|
||||
|
||||
Widgets.IconButton {
|
||||
id: iconButton
|
||||
implicitSize: 20
|
||||
source: modelData.icon
|
||||
padding: 0
|
||||
|
||||
QsMenuAnchor {
|
||||
id: menuAnchor
|
||||
menu: modelData.menu
|
||||
|
||||
anchor {
|
||||
window: bar
|
||||
adjustment: PopupAdjustment.Flip
|
||||
|
||||
onAnchoring: {
|
||||
anchor.rect = mapToItem(bar.contentItem, -2, height + 4, width + 2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: menuAnchor.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue