remove bar dependency from modules, use QsWindow.window.screen instead
This commit is contained in:
parent
dc8344d0af
commit
b1d0be5d31
4 changed files with 5 additions and 16 deletions
|
|
@ -135,15 +135,11 @@ PanelWindow {
|
||||||
M.BarGroup {
|
M.BarGroup {
|
||||||
id: workspacesGroup
|
id: workspacesGroup
|
||||||
leftEdge: true
|
leftEdge: true
|
||||||
M.WorkspacesModule {
|
M.WorkspacesModule {}
|
||||||
bar: bar
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
M.BarGroup {
|
M.BarGroup {
|
||||||
leftEdge: !workspacesGroup.visible
|
leftEdge: !workspacesGroup.visible
|
||||||
M.TrayModule {
|
M.TrayModule {}
|
||||||
bar: bar
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
M.BarGroup {
|
M.BarGroup {
|
||||||
id: _windowTitleGroup
|
id: _windowTitleGroup
|
||||||
|
|
@ -174,9 +170,7 @@ PanelWindow {
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
M.BarGroup {
|
M.BarGroup {
|
||||||
M.MprisModule {
|
M.MprisModule {}
|
||||||
bar: bar
|
|
||||||
}
|
|
||||||
M.VolumeModule {}
|
M.VolumeModule {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,6 @@ M.BarModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
required property var bar
|
|
||||||
|
|
||||||
M.BarIcon {
|
M.BarIcon {
|
||||||
icon: S.MprisService.playing ? "\uF04B" : (S.MprisService.player?.playbackState === MprisPlaybackState.Paused ? "\uDB80\uDFE4" : "\uDB81\uDCDB")
|
icon: S.MprisService.playing ? "\uF04B" : (S.MprisService.player?.playbackState === MprisPlaybackState.Paused ? "\uDB80\uDFE4" : "\uDB81\uDCDB")
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ M.BarModule {
|
||||||
|
|
||||||
active: S.Modules.tray.enable && _trayRepeater.count > 0
|
active: S.Modules.tray.enable && _trayRepeater.count > 0
|
||||||
|
|
||||||
required property var bar
|
|
||||||
property var _activeMenu: null
|
property var _activeMenu: null
|
||||||
|
|
||||||
// --- debug logging (remove once tray is confirmed working) ---
|
// --- debug logging (remove once tray is confirmed working) ---
|
||||||
|
|
@ -104,7 +103,7 @@ M.BarModule {
|
||||||
M.TrayMenu {
|
M.TrayMenu {
|
||||||
accentColor: root.accentColor
|
accentColor: root.accentColor
|
||||||
handle: iconItem.modelData.menu
|
handle: iconItem.modelData.menu
|
||||||
screen: root.bar.screen
|
screen: QsWindow.window?.screen ?? null
|
||||||
anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
|
anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
|
||||||
onDismissed: {
|
onDismissed: {
|
||||||
menuLoader.active = false;
|
menuLoader.active = false;
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,9 @@ M.BarModule {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
cursorShape: Qt.ArrowCursor
|
cursorShape: Qt.ArrowCursor
|
||||||
|
|
||||||
required property var bar
|
|
||||||
|
|
||||||
property var _allWorkspaces: []
|
property var _allWorkspaces: []
|
||||||
property int _activeId: -1
|
property int _activeId: -1
|
||||||
readonly property string _output: bar.screen?.name ?? ""
|
readonly property string _output: QsWindow.window?.screen?.name ?? ""
|
||||||
readonly property var _workspaces: _allWorkspaces.filter(w => w.output === root._output)
|
readonly property var _workspaces: _allWorkspaces.filter(w => w.output === root._output)
|
||||||
|
|
||||||
// Initial state
|
// Initial state
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue