progress update

This commit is contained in:
kossLAN 2025-07-16 19:34:36 -04:00
parent 41ccd5c460
commit e82ef6e0c1
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
7 changed files with 175 additions and 128 deletions

View file

@ -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

View file

@ -25,13 +25,15 @@ ColumnLayout {
WrapperRectangle {
Layout.fillWidth: true
Layout.preferredHeight: 25
radius: 6
radius: 4
color: {
if (!root.menuData?.enabled)
return "transparent";
if (entryArea.containsMouse)
return ShellSettings.colors["primary"];
if (entryArea.containsMouse) {
let base = ShellSettings.colors.active;
return Qt.rgba(base.r, base.g, base.b, 0.15);
}
return "transparent";
}
@ -92,13 +94,13 @@ ColumnLayout {
text: root.menuData?.text ?? ""
verticalAlignment: Text.AlignVCenter
color: {
let color = Qt.color(ShellSettings.colors["inverse_surface"]);
let color = Qt.color(ShellSettings.colors.active);
if (!root.menuData?.enabled)
return color.darker(2);
if (entryArea.containsMouse)
return Qt.color(ShellSettings.colors["inverse_primary"]);
// if (entryArea.containsMouse)
// return Qt.color(ShellSettings.colors["inverse_primary"]);
return color;
}
@ -139,7 +141,7 @@ ColumnLayout {
WrapperRectangle {
id: subTrayMenu
color: ShellSettings.colors["surface_container"]
color: ShellSettings.colors.surface_container
radius: 8
visible: false
Layout.fillWidth: true

View file

@ -12,7 +12,8 @@ ColumnLayout {
Rectangle {
visible: (root.modelData?.isSeparator ?? false)
color: ShellSettings.colors["surface_container_high"]
color: ShellSettings.colors.inactive
opacity: 0.1
Layout.fillWidth: true
Layout.preferredHeight: 2
Layout.leftMargin: 8