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
50
quickshell/Components/SystemTrayButton.qml
Normal file
50
quickshell/Components/SystemTrayButton.qml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Services.SystemTray
|
||||
import "root:/DataSources"
|
||||
|
||||
Item {
|
||||
required property QsMenuHandle modelData
|
||||
|
||||
width: parent.width
|
||||
height: 30
|
||||
|
||||
property real text_point_size: 12
|
||||
property real length: width / text_point_size
|
||||
|
||||
Rectangle {
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: 10
|
||||
rightMargin: 10
|
||||
}
|
||||
|
||||
color: Stylix.base01
|
||||
radius: 5
|
||||
|
||||
Text {
|
||||
anchors {
|
||||
centerIn: parent
|
||||
}
|
||||
width: parent.width - 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: modelData?.text ?? ""
|
||||
color: Stylix.base05
|
||||
font.pointSize: text_point_size
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: mouse => {
|
||||
modelData.triggered();
|
||||
popup.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue