move Theme, SystemStats, Modules to shell/services/
This commit is contained in:
parent
197f6976e0
commit
989182d603
59 changed files with 432 additions and 388 deletions
|
|
@ -5,11 +5,12 @@ import Quickshell
|
|||
import Quickshell.Services.SystemTray
|
||||
|
||||
import "." as M
|
||||
import "../services" as S
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
spacing: M.Theme.moduleSpacing + 2
|
||||
visible: M.Modules.tray.enable && SystemTray.items.length > 0
|
||||
spacing: S.Theme.moduleSpacing + 2
|
||||
visible: S.Modules.tray.enable && SystemTray.items.length > 0
|
||||
|
||||
required property var bar
|
||||
property var _activeMenu: null
|
||||
|
|
@ -25,8 +26,8 @@ RowLayout {
|
|||
property bool _hovered: false
|
||||
property real _pulseOpacity: 1
|
||||
|
||||
implicitWidth: M.Theme.fontSize + 4
|
||||
implicitHeight: M.Theme.fontSize + 4
|
||||
implicitWidth: S.Theme.fontSize + 4
|
||||
implicitHeight: S.Theme.fontSize + 4
|
||||
|
||||
SequentialAnimation {
|
||||
running: iconItem._needsAttention
|
||||
|
|
@ -56,16 +57,16 @@ RowLayout {
|
|||
layer.enabled: iconItem._needsAttention || iconItem._hovered
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: true
|
||||
shadowColor: iconItem._needsAttention ? M.Theme.base08 : M.Theme.base05
|
||||
shadowColor: iconItem._needsAttention ? S.Theme.base08 : S.Theme.base05
|
||||
shadowBlur: iconItem._needsAttention ? 0.8 : 0.5
|
||||
shadowVerticalOffset: 0
|
||||
shadowHorizontalOffset: 0
|
||||
}
|
||||
|
||||
M.ThemedIcon {
|
||||
S.ThemedIcon {
|
||||
anchors.fill: parent
|
||||
source: iconItem.modelData.icon
|
||||
tint: iconItem._needsAttention ? M.Theme.base08 : (root.parent?.accentColor ?? M.Theme.base05)
|
||||
tint: iconItem._needsAttention ? S.Theme.base08 : (root.parent?.accentColor ?? S.Theme.base05)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +78,7 @@ RowLayout {
|
|||
M.FlyoutState.text = tip;
|
||||
M.FlyoutState.itemX = iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
|
||||
M.FlyoutState.screen = QsWindow.window?.screen ?? null;
|
||||
M.FlyoutState.accentColor = root.parent?.accentColor ?? M.Theme.base05;
|
||||
M.FlyoutState.accentColor = root.parent?.accentColor ?? S.Theme.base05;
|
||||
M.FlyoutState.visible = true;
|
||||
} else if (!hovered) {
|
||||
M.FlyoutState.visible = false;
|
||||
|
|
@ -110,7 +111,7 @@ RowLayout {
|
|||
id: menuLoader
|
||||
active: false
|
||||
M.TrayMenu {
|
||||
accentColor: root.parent?.accentColor ?? M.Theme.base05
|
||||
accentColor: root.parent?.accentColor ?? S.Theme.base05
|
||||
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