mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat: wheee
This commit is contained in:
parent
4be1b9f090
commit
d218e71e17
10 changed files with 250 additions and 164 deletions
45
quickshell/Components/SystemTrayWrapper.qml
Normal file
45
quickshell/Components/SystemTrayWrapper.qml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import "root:/DataSources"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
Layout.alignment: Qt.AlignVCenter;
|
||||
implicitWidth: 25
|
||||
implicitHeight: parent.height
|
||||
Text {
|
||||
id: texty
|
||||
anchors.centerIn: parent
|
||||
text: ""
|
||||
color: Stylix.base05
|
||||
}
|
||||
MouseArea {
|
||||
id: ma
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: function(mouseEvent) {
|
||||
var m = root.QsWindow.mapFromItem(ma, mouseEvent.x, mouseEvent.y);
|
||||
var offset = wrapperPopup.width / 2.0;
|
||||
wrapperPopup.clicky = m.x - offset;
|
||||
wrapperPopup.visible = !wrapperPopup.visible
|
||||
}
|
||||
}
|
||||
PopupWindow {
|
||||
property real clicky
|
||||
id: wrapperPopup
|
||||
anchor.window: root.QsWindow.window
|
||||
anchor.rect.y: parentWindow.height
|
||||
anchor.rect.x: clicky
|
||||
width: systray.width + 10
|
||||
height: systray.height + 10
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Stylix.base01
|
||||
SystemTray {
|
||||
id: systray
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue