refactor: unified BarModule base component, click-to-open panels, remove pinning
This commit is contained in:
parent
034f0b6d85
commit
26476dc930
33 changed files with 273 additions and 517 deletions
|
|
@ -7,10 +7,11 @@ import Quickshell.Services.SystemTray
|
|||
import "." as M
|
||||
import "../services" as S
|
||||
|
||||
RowLayout {
|
||||
M.BarModule {
|
||||
id: root
|
||||
spacing: S.Theme.moduleSpacing + 2
|
||||
visible: S.Modules.tray.enable && _trayRepeater.count > 0
|
||||
cursorShape: Qt.ArrowCursor
|
||||
|
||||
required property var bar
|
||||
property var _activeMenu: null
|
||||
|
|
@ -69,7 +70,7 @@ RowLayout {
|
|||
M.ThemedIcon {
|
||||
anchors.fill: parent
|
||||
source: iconItem.modelData.icon
|
||||
tint: iconItem._needsAttention ? S.Theme.base08 : (root.parent?.accentColor ?? S.Theme.base05)
|
||||
tint: iconItem._needsAttention ? S.Theme.base08 : root.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +82,7 @@ RowLayout {
|
|||
M.TooltipState.text = tip;
|
||||
M.TooltipState.itemX = iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
|
||||
M.TooltipState.screen = QsWindow.window?.screen ?? null;
|
||||
M.TooltipState.accentColor = root.parent?.accentColor ?? S.Theme.base05;
|
||||
M.TooltipState.accentColor = root.accentColor;
|
||||
M.TooltipState.visible = true;
|
||||
} else if (!hovered) {
|
||||
M.TooltipState.visible = false;
|
||||
|
|
@ -114,7 +115,7 @@ RowLayout {
|
|||
id: menuLoader
|
||||
active: false
|
||||
M.TrayMenu {
|
||||
accentColor: root.parent?.accentColor ?? S.Theme.base05
|
||||
accentColor: root.accentColor
|
||||
handle: iconItem.modelData.menu
|
||||
screen: root.bar.screen
|
||||
anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue