mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-05 06:59:50 -05:00
progress update
This commit is contained in:
parent
41ccd5c460
commit
e82ef6e0c1
7 changed files with 175 additions and 128 deletions
|
|
@ -12,7 +12,8 @@ RowLayout {
|
|||
spacing: 5
|
||||
visible: SystemTray.items.values.length > 0
|
||||
|
||||
required property var popup
|
||||
// required property var popup
|
||||
required property var bar
|
||||
|
||||
Repeater {
|
||||
model: SystemTray.items
|
||||
|
|
@ -29,23 +30,26 @@ RowLayout {
|
|||
onClicked: {
|
||||
menuOpener.menu = trayField.modelData.menu;
|
||||
|
||||
if (root.popup.content == trayMenu) {
|
||||
root.popup.hide();
|
||||
if (trayMenu.visible) {
|
||||
trayMenu.visible = false;
|
||||
// root.popup.hide();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
root.popup.set(this, trayMenu);
|
||||
root.popup.show();
|
||||
trayMenu.visible = true;
|
||||
|
||||
// root.popup.set(this, trayMenu);
|
||||
// root.popup.show();
|
||||
}
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 2
|
||||
// margins: 2
|
||||
}
|
||||
|
||||
IconImage {
|
||||
id: trayIcon
|
||||
anchors.fill: parent
|
||||
source: {
|
||||
// console.log(trayField.modelData.id);
|
||||
switch (trayField.modelData.id) {
|
||||
|
|
@ -55,6 +59,11 @@ RowLayout {
|
|||
return trayField.modelData.icon;
|
||||
}
|
||||
}
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -62,13 +71,19 @@ RowLayout {
|
|||
id: menuOpener
|
||||
}
|
||||
|
||||
WrapperItem {
|
||||
Widgets.StyledPopup {
|
||||
id: trayMenu
|
||||
visible: false
|
||||
// visible: false
|
||||
|
||||
property var leftItem: false
|
||||
property var rightItem: false
|
||||
|
||||
anchor {
|
||||
window: root.bar
|
||||
item: trayButton
|
||||
margins.top: root.bar.height + 5
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: menuContainer
|
||||
spacing: 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue