still broken but getting there

This commit is contained in:
kossLAN 2025-08-05 12:12:32 -04:00
parent 189144099b
commit 446d83ce2c
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
20 changed files with 143 additions and 1219 deletions

View file

@ -5,15 +5,14 @@ import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import Quickshell.Services.SystemTray
import "../../widgets" as Widgets
import qs.widgets
RowLayout {
id: root
spacing: 5
visible: SystemTray.items.values.length > 0
// required property var popup
required property var bar
required property var popup
Repeater {
model: SystemTray.items
@ -24,32 +23,29 @@ RowLayout {
Layout.fillHeight: true
required property SystemTrayItem modelData
Widgets.StyledMouseArea {
StyledMouseArea {
id: trayButton
hoverEnabled: true
onClicked: {
menuOpener.menu = trayField.modelData.menu;
if (trayMenu.visible) {
trayMenu.visible = false;
// root.popup.hide();
if (root.popup.content == trayMenu) {
root.popup.hide();
return;
}
trayMenu.visible = true;
// root.popup.set(this, trayMenu);
// root.popup.show();
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) {
@ -59,11 +55,6 @@ RowLayout {
return trayField.modelData.icon;
}
}
anchors {
fill: parent
margins: 2
}
}
}
@ -71,19 +62,13 @@ RowLayout {
id: menuOpener
}
Widgets.StyledPopup {
WrapperItem {
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

@ -31,8 +31,7 @@ ColumnLayout {
return "transparent";
if (entryArea.containsMouse) {
let base = ShellSettings.colors.active;
return Qt.rgba(base.r, base.g, base.b, 0.15);
return ShellSettings.colors.active_translucent;
}
return "transparent";
@ -141,9 +140,15 @@ ColumnLayout {
WrapperRectangle {
id: subTrayMenu
color: ShellSettings.colors.surface_container
color: ShellSettings.colors.surface_container_translucent
radius: 8
visible: false
border {
width: 1
color: ShellSettings.colors.active_translucent
}
Layout.fillWidth: true
QsMenuOpener {

View file

@ -1,7 +1,7 @@
import Quickshell
import QtQuick
import QtQuick.Layouts
import "../.."
import qs
ColumnLayout {
id: root
@ -12,8 +12,8 @@ ColumnLayout {
Rectangle {
visible: (root.modelData?.isSeparator ?? false)
color: ShellSettings.colors.inactive
opacity: 0.1
color: ShellSettings.colors.inactive_translucent
// opacity: 0.1
Layout.fillWidth: true
Layout.preferredHeight: 2
Layout.leftMargin: 8