mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-13 06:33:30 -04:00
refactor(fullscreen): Refine fullscreen layering and frame overlay behavior
- Replaced fullscreen hide/reveal toggles with Show Over Fullscreen layer toggles - Added Launcher opt to Show Over Fullscreen setting - Kept fullscreen stacking compositor-owned via top/overlay layer choices - Fixed Hyrland Special Workspaces - Updated DMS Advanced Configuration docs
This commit is contained in:
@@ -10,13 +10,15 @@ Item {
|
||||
required property var axis
|
||||
required property var barConfig
|
||||
|
||||
visible: !SettingsData.frameEnabled
|
||||
readonly property bool frameShapesBar: SettingsData.frameEnabled && barWindow.usesConnectedFrameChrome
|
||||
|
||||
visible: !frameShapesBar
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
readonly property bool gothEnabled: (barConfig?.gothCornersEnabled ?? false) && !barWindow.hasMaximizedToplevel
|
||||
readonly property bool gothEnabled: (barConfig?.gothCornersEnabled ?? false) && !(barWindow.flattenForMaximizedWindow && barWindow.hasMaximizedToplevel)
|
||||
anchors.leftMargin: -(gothEnabled && axis.isVertical && axis.edge === "right" ? barWindow._wingR : 0)
|
||||
anchors.rightMargin: -(gothEnabled && axis.isVertical && axis.edge === "left" ? barWindow._wingR : 0)
|
||||
anchors.topMargin: -(gothEnabled && !axis.isVertical && axis.edge === "bottom" ? barWindow._wingR : 0)
|
||||
@@ -39,11 +41,11 @@ Item {
|
||||
}
|
||||
|
||||
property real rt: {
|
||||
if (SettingsData.frameEnabled)
|
||||
if (frameShapesBar)
|
||||
return SettingsData.frameRounding;
|
||||
if (barConfig?.squareCorners ?? false)
|
||||
return 0;
|
||||
if (barWindow.hasMaximizedToplevel)
|
||||
if (barWindow.flattenForMaximizedWindow && barWindow.hasMaximizedToplevel)
|
||||
return 0;
|
||||
return Theme.cornerRadius;
|
||||
}
|
||||
@@ -113,9 +115,32 @@ Item {
|
||||
readonly property real shadowOffsetX: Theme.elevationOffsetXFor(hasPerBarOverride ? null : elevLevel, effectiveShadowDirection, shadowOffsetMagnitude)
|
||||
readonly property real shadowOffsetY: Theme.elevationOffsetYFor(hasPerBarOverride ? null : elevLevel, effectiveShadowDirection, shadowOffsetMagnitude)
|
||||
|
||||
readonly property string mainPath: generatePathForPosition(width, height)
|
||||
readonly property string borderFullPath: generateBorderFullPath(width, height)
|
||||
readonly property string borderEdgePath: generateBorderEdgePath(width, height)
|
||||
readonly property string mainPath: {
|
||||
frameShapesBar;
|
||||
rt;
|
||||
wing;
|
||||
barWindow.flattenForMaximizedWindow;
|
||||
barWindow.hasMaximizedToplevel;
|
||||
width;
|
||||
height;
|
||||
return generatePathForPosition(width, height);
|
||||
}
|
||||
readonly property string borderFullPath: {
|
||||
frameShapesBar;
|
||||
rt;
|
||||
wing;
|
||||
width;
|
||||
height;
|
||||
return generateBorderFullPath(width, height);
|
||||
}
|
||||
readonly property string borderEdgePath: {
|
||||
frameShapesBar;
|
||||
rt;
|
||||
wing;
|
||||
width;
|
||||
height;
|
||||
return generateBorderEdgePath(width, height);
|
||||
}
|
||||
property bool mainPathCorrectShape: false
|
||||
property bool borderFullPathCorrectShape: false
|
||||
property bool borderEdgePathCorrectShape: false
|
||||
@@ -136,6 +161,12 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
onFrameShapesBarChanged: {
|
||||
mainPathCorrectShape = false;
|
||||
borderFullPathCorrectShape = false;
|
||||
borderEdgePathCorrectShape = false;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
@@ -259,7 +290,7 @@ Item {
|
||||
h = h - wing;
|
||||
const r = wing;
|
||||
const cr = rt;
|
||||
const crE = SettingsData.frameEnabled ? 0 : cr;
|
||||
const crE = frameShapesBar ? 0 : cr;
|
||||
|
||||
let d = `M ${crE} 0`;
|
||||
d += ` L ${w - crE} 0`;
|
||||
@@ -290,7 +321,7 @@ Item {
|
||||
h = h - wing;
|
||||
const r = wing;
|
||||
const cr = rt;
|
||||
const crE = SettingsData.frameEnabled ? 0 : cr;
|
||||
const crE = frameShapesBar ? 0 : cr;
|
||||
|
||||
let d = `M ${crE} ${fullH}`;
|
||||
d += ` L ${w - crE} ${fullH}`;
|
||||
@@ -320,7 +351,7 @@ Item {
|
||||
w = w - wing;
|
||||
const r = wing;
|
||||
const cr = rt;
|
||||
const crE = SettingsData.frameEnabled ? 0 : cr;
|
||||
const crE = frameShapesBar ? 0 : cr;
|
||||
|
||||
let d = `M 0 ${crE}`;
|
||||
d += ` L 0 ${h - crE}`;
|
||||
@@ -351,7 +382,7 @@ Item {
|
||||
w = w - wing;
|
||||
const r = wing;
|
||||
const cr = rt;
|
||||
const crE = SettingsData.frameEnabled ? 0 : cr;
|
||||
const crE = frameShapesBar ? 0 : cr;
|
||||
|
||||
let d = `M ${fullW} ${crE}`;
|
||||
d += ` L ${fullW} ${h - crE}`;
|
||||
|
||||
@@ -24,8 +24,9 @@ Item {
|
||||
readonly property real innerPadding: barConfig?.innerPadding ?? 4
|
||||
readonly property real outlineThickness: (barConfig?.widgetOutlineEnabled ?? false) ? (barConfig?.widgetOutlineThickness ?? 1) : 0
|
||||
readonly property real _edgeBaseMargin: Math.max(Theme.spacingXS, innerPadding * 0.8)
|
||||
readonly property real _frameEdgeFloorInset: SettingsData.frameEnabled ? Math.max(0, SettingsData.frameThickness - _edgeBaseMargin) : 0
|
||||
readonly property bool _hasBarWindow: barWindow !== undefined && barWindow !== null
|
||||
readonly property bool _usesConnectedFrameChrome: _hasBarWindow && (barWindow.usesConnectedFrameChrome ?? false)
|
||||
readonly property real _frameEdgeFloorInset: (SettingsData.frameEnabled && _usesConnectedFrameChrome) ? Math.max(0, SettingsData.frameThickness - _edgeBaseMargin) : 0
|
||||
readonly property bool _barIsVertical: _hasBarWindow ? barWindow.isVertical : false
|
||||
readonly property string _barScreenName: _hasBarWindow ? (barWindow.screenName || "") : ""
|
||||
readonly property bool hasAdjacentTopBarLive: _hasBarWindow && barWindow.hasAdjacentTopBar
|
||||
@@ -47,22 +48,22 @@ Item {
|
||||
_hadAdjacentRightBar = true
|
||||
|
||||
readonly property real _frameLeftInset: {
|
||||
if (!_hasBarWindow || !SettingsData.frameEnabled || _barIsVertical)
|
||||
if (!_hasBarWindow || !SettingsData.frameEnabled || !_usesConnectedFrameChrome || _barIsVertical)
|
||||
return 0;
|
||||
return hasAdjacentLeftBarLive ? SettingsData.frameBarSize : (_hadAdjacentLeftBar ? _frameEdgeFloorInset : 0);
|
||||
}
|
||||
readonly property real _frameRightInset: {
|
||||
if (!_hasBarWindow || !SettingsData.frameEnabled || _barIsVertical)
|
||||
if (!_hasBarWindow || !SettingsData.frameEnabled || !_usesConnectedFrameChrome || _barIsVertical)
|
||||
return 0;
|
||||
return hasAdjacentRightBarLive ? SettingsData.frameBarSize : (_hadAdjacentRightBar ? _frameEdgeFloorInset : 0);
|
||||
}
|
||||
readonly property real _frameTopInset: {
|
||||
if (!_hasBarWindow || !SettingsData.frameEnabled || !_barIsVertical)
|
||||
if (!_hasBarWindow || !SettingsData.frameEnabled || !_usesConnectedFrameChrome || !_barIsVertical)
|
||||
return 0;
|
||||
return hasAdjacentTopBarLive ? SettingsData.frameThickness : (_hadAdjacentTopBar ? _frameEdgeFloorInset : 0);
|
||||
}
|
||||
readonly property real _frameBottomInset: {
|
||||
if (!_hasBarWindow || !SettingsData.frameEnabled || !_barIsVertical)
|
||||
if (!_hasBarWindow || !SettingsData.frameEnabled || !_usesConnectedFrameChrome || !_barIsVertical)
|
||||
return 0;
|
||||
return hasAdjacentBottomBarLive ? SettingsData.frameThickness : (_hadAdjacentBottomBar ? _frameEdgeFloorInset : 0);
|
||||
}
|
||||
@@ -95,7 +96,7 @@ Item {
|
||||
}
|
||||
|
||||
Behavior on anchors.leftMargin {
|
||||
enabled: _animateFrameInsets && SettingsData.frameEnabled
|
||||
enabled: _animateFrameInsets && _usesConnectedFrameChrome
|
||||
NumberAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Easing.OutCubic
|
||||
@@ -103,7 +104,7 @@ Item {
|
||||
}
|
||||
|
||||
Behavior on anchors.rightMargin {
|
||||
enabled: _animateFrameInsets && SettingsData.frameEnabled
|
||||
enabled: _animateFrameInsets && _usesConnectedFrameChrome
|
||||
NumberAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Easing.OutCubic
|
||||
@@ -111,7 +112,7 @@ Item {
|
||||
}
|
||||
|
||||
Behavior on anchors.topMargin {
|
||||
enabled: _animateFrameInsets && SettingsData.frameEnabled
|
||||
enabled: _animateFrameInsets && _usesConnectedFrameChrome
|
||||
NumberAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Easing.OutCubic
|
||||
@@ -119,7 +120,7 @@ Item {
|
||||
}
|
||||
|
||||
Behavior on anchors.bottomMargin {
|
||||
enabled: _animateFrameInsets && SettingsData.frameEnabled
|
||||
enabled: _animateFrameInsets && _usesConnectedFrameChrome
|
||||
NumberAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Easing.OutCubic
|
||||
|
||||
@@ -108,6 +108,8 @@ PanelWindow {
|
||||
triggerDashTab(2);
|
||||
}
|
||||
|
||||
readonly property bool usesOverlayLayer: CompositorService.framePeerSurfacesUseOverlayForScreen(barWindow.screen) || (barConfig?.showOverFullscreen ?? false)
|
||||
|
||||
readonly property var dBarLayer: {
|
||||
switch (Quickshell.env("DMS_DANKBAR_LAYER")) {
|
||||
case "bottom":
|
||||
@@ -119,10 +121,7 @@ PanelWindow {
|
||||
case "top":
|
||||
return WlrLayer.Top;
|
||||
default:
|
||||
// Elevate to Overlay when Frame is enabled so the bar stays above
|
||||
// the FrameWindow (WlrLayer.Top) when it is re-mapped on mode switch,
|
||||
// but drop back to Top while a true fullscreen app owns this screen.
|
||||
return SettingsData.frameEnabled && !barWindow.hasFullscreenToplevel ? WlrLayer.Overlay : WlrLayer.Top;
|
||||
return barWindow.usesOverlayLayer ? WlrLayer.Overlay : WlrLayer.Top;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +151,13 @@ PanelWindow {
|
||||
onTriggered: barBlur.rebuild()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: barWindow
|
||||
function onUsesConnectedFrameChromeChanged() {
|
||||
_blurRebuildTimer.restart();
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: blurRegionComp
|
||||
Region {}
|
||||
@@ -179,7 +185,7 @@ PanelWindow {
|
||||
// In frame mode, FrameWindow owns the blur region for the entire screen edge
|
||||
// (including the bar area). The bar must not set its own competing blur region
|
||||
// so that frameBlurEnabled acts as the single control for all blur in frame mode.
|
||||
if (SettingsData.frameEnabled)
|
||||
if (SettingsData.frameEnabled && barWindow.usesConnectedFrameChrome)
|
||||
return;
|
||||
|
||||
const widgets = barWindow._blurWidgetItems.filter(w => w && w.visible && w.width > 0 && w.height > 0);
|
||||
@@ -292,7 +298,7 @@ PanelWindow {
|
||||
readonly property color _surfaceContainer: Theme.surfaceContainer
|
||||
readonly property string _barId: barConfig?.id ?? "default"
|
||||
property real _backgroundAlpha: barConfig?.transparency ?? 1.0
|
||||
readonly property color _bgColor: SettingsData.frameEnabled ? Qt.rgba(SettingsData.effectiveFrameColor.r, SettingsData.effectiveFrameColor.g, SettingsData.effectiveFrameColor.b, SettingsData.frameOpacity) : Theme.withAlpha(_surfaceContainer, _backgroundAlpha)
|
||||
readonly property color _bgColor: (SettingsData.frameEnabled && usesConnectedFrameChrome) ? Qt.rgba(SettingsData.effectiveFrameColor.r, SettingsData.effectiveFrameColor.g, SettingsData.effectiveFrameColor.b, SettingsData.frameOpacity) : Theme.withAlpha(_surfaceContainer, _backgroundAlpha)
|
||||
|
||||
function _updateBackgroundAlpha() {
|
||||
const live = SettingsData.barConfigs.find(c => c.id === _barId);
|
||||
@@ -316,16 +322,13 @@ PanelWindow {
|
||||
|
||||
property string screenName: modelData.name
|
||||
|
||||
readonly property bool usesConnectedFrameChrome: CompositorService.usesConnectedFrameChromeForScreen(screenName)
|
||||
|
||||
// Flatten/spacing collapse for maximized windows is only for frame-integrated layout.
|
||||
// When the bar draws its own pill, keep rounded corners and spacing like the dock.
|
||||
readonly property bool flattenForMaximizedWindow: !SettingsData.frameEnabled || usesConnectedFrameChrome
|
||||
|
||||
property bool hasMaximizedToplevel: false
|
||||
readonly property bool hasFullscreenToplevel: {
|
||||
if (!(barConfig?.fullscreenDetection ?? true))
|
||||
return false;
|
||||
CompositorService.sortedToplevels;
|
||||
ToplevelManager.activeToplevel;
|
||||
if (CompositorService.isNiri)
|
||||
NiriService.allWorkspaces;
|
||||
return CompositorService.hasFullscreenToplevelOnScreen(screenName);
|
||||
}
|
||||
property bool shouldHideForWindows: false
|
||||
|
||||
function _updateHasMaximizedToplevel() {
|
||||
@@ -427,7 +430,7 @@ PanelWindow {
|
||||
shouldHideForWindows = filtered.length > 0;
|
||||
}
|
||||
|
||||
property real effectiveSpacing: SettingsData.frameEnabled ? 0 : (hasMaximizedToplevel ? 0 : (barConfig?.spacing ?? 4))
|
||||
property real effectiveSpacing: (SettingsData.frameEnabled && usesConnectedFrameChrome) ? 0 : ((flattenForMaximizedWindow && hasMaximizedToplevel) ? 0 : (barConfig?.spacing ?? 4))
|
||||
|
||||
Behavior on effectiveSpacing {
|
||||
enabled: barWindow.visible
|
||||
@@ -438,7 +441,7 @@ PanelWindow {
|
||||
}
|
||||
|
||||
readonly property int notificationCount: NotificationService.notifications.length
|
||||
readonly property real effectiveBarThickness: SettingsData.frameEnabled ? SettingsData.frameBarSize : Theme.snap(Math.max(barWindow.widgetThickness + (barConfig?.innerPadding ?? 4) + 4, Theme.barHeight - 4 - (8 - (barConfig?.innerPadding ?? 4))), _dpr)
|
||||
readonly property real effectiveBarThickness: (SettingsData.frameEnabled && usesConnectedFrameChrome) ? SettingsData.frameBarSize : Theme.snap(Math.max(barWindow.widgetThickness + (barConfig?.innerPadding ?? 4) + 4, Theme.barHeight - 4 - (8 - (barConfig?.innerPadding ?? 4))), _dpr)
|
||||
readonly property bool effectiveOpenOnOverview: SettingsData.frameEnabled ? SettingsData.frameShowOnOverview : (barConfig?.openOnOverview ?? false)
|
||||
readonly property real widgetThickness: Theme.snap(Math.max(20, 26 + (barConfig?.innerPadding ?? 4) * 0.6), _dpr)
|
||||
|
||||
@@ -636,9 +639,9 @@ PanelWindow {
|
||||
anchors.left: !isVertical ? true : (barPos === SettingsData.Position.Left)
|
||||
anchors.right: !isVertical ? true : (barPos === SettingsData.Position.Right)
|
||||
|
||||
readonly property bool reserveExclusiveWhenAutoHidden: SettingsData.connectedFrameModeActive && !!barWindow.screen && SettingsData.isScreenInPreferences(barWindow.screen, SettingsData.frameScreenPreferences)
|
||||
readonly property bool reserveExclusiveWhenAutoHidden: SettingsData.connectedFrameModeActive && usesConnectedFrameChrome && !!barWindow.screen && SettingsData.isScreenInPreferences(barWindow.screen, SettingsData.frameScreenPreferences)
|
||||
|
||||
exclusiveZone: (barWindow.hasFullscreenToplevel || !(barConfig?.visible ?? true) || (topBarCore.autoHide && !barWindow.reserveExclusiveWhenAutoHidden)) ? -1 : (barWindow.effectiveBarThickness + effectiveSpacing + (Theme.isConnectedEffect ? 0 : (barConfig?.bottomGap ?? 0)))
|
||||
exclusiveZone: (!(barConfig?.visible ?? true) || (topBarCore.autoHide && !barWindow.reserveExclusiveWhenAutoHidden)) ? -1 : (barWindow.effectiveBarThickness + effectiveSpacing + (usesConnectedFrameChrome ? 0 : (barConfig?.bottomGap ?? 0)))
|
||||
|
||||
Item {
|
||||
id: inputMask
|
||||
@@ -647,9 +650,9 @@ PanelWindow {
|
||||
|
||||
readonly property bool inOverviewWithShow: CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview
|
||||
readonly property bool effectiveVisible: (barConfig?.visible ?? true) || inOverviewWithShow
|
||||
readonly property bool showing: effectiveVisible && !barWindow.hasFullscreenToplevel && (topBarCore.reveal || inOverviewWithShow || !topBarCore.autoHide)
|
||||
readonly property bool showing: effectiveVisible && (topBarCore.reveal || inOverviewWithShow || !topBarCore.autoHide)
|
||||
|
||||
readonly property int maskThickness: barWindow.hasFullscreenToplevel ? 0 : (showing ? barThickness : 1)
|
||||
readonly property int maskThickness: showing ? barThickness : 1
|
||||
|
||||
x: {
|
||||
if (!axis.isVertical) {
|
||||
@@ -826,9 +829,6 @@ PanelWindow {
|
||||
}
|
||||
|
||||
property bool reveal: {
|
||||
if (barWindow.hasFullscreenToplevel)
|
||||
return false;
|
||||
|
||||
const inOverviewWithShow = CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview;
|
||||
if (inOverviewWithShow)
|
||||
return true;
|
||||
@@ -897,9 +897,9 @@ PanelWindow {
|
||||
bottom: barWindow.isVertical ? parent.bottom : undefined
|
||||
}
|
||||
readonly property bool inOverview: CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview
|
||||
hoverEnabled: (barConfig?.autoHide ?? false) && !inOverview && !barWindow.hasFullscreenToplevel && !topBarCore.popoutPinsReveal
|
||||
hoverEnabled: (barConfig?.autoHide ?? false) && !inOverview && !topBarCore.popoutPinsReveal
|
||||
acceptedButtons: Qt.NoButton
|
||||
enabled: (barConfig?.autoHide ?? false) && !inOverview && !barWindow.hasFullscreenToplevel
|
||||
enabled: (barConfig?.autoHide ?? false) && !inOverview
|
||||
|
||||
Item {
|
||||
id: topBarContainer
|
||||
|
||||
@@ -11,13 +11,14 @@ BasePill {
|
||||
id: root
|
||||
|
||||
readonly property string focusedScreenName: (CompositorService.isHyprland && typeof Hyprland !== "undefined" && Hyprland.focusedWorkspace && Hyprland.focusedWorkspace.monitor ? (Hyprland.focusedWorkspace.monitor.name || "") : CompositorService.isNiri && typeof NiriService !== "undefined" && NiriService.currentOutput ? NiriService.currentOutput : "")
|
||||
readonly property string targetScreenName: parentScreen?.name || focusedScreenName
|
||||
|
||||
function resolveNotepadInstance() {
|
||||
if (typeof notepadSlideoutVariants === "undefined" || !notepadSlideoutVariants || !notepadSlideoutVariants.instances) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const targetScreen = focusedScreenName;
|
||||
const targetScreen = targetScreenName;
|
||||
if (targetScreen) {
|
||||
for (var i = 0; i < notepadSlideoutVariants.instances.length; i++) {
|
||||
var slideout = notepadSlideoutVariants.instances[i];
|
||||
@@ -34,6 +35,12 @@ BasePill {
|
||||
readonly property bool isActive: notepadInstance?.isVisible ?? false
|
||||
property bool isAutoHideBar: false
|
||||
|
||||
function prepareNotepadInstance(instance) {
|
||||
if (instance)
|
||||
instance.triggerUsesOverlayLayer = root.barUsesOverlayLayer;
|
||||
return instance;
|
||||
}
|
||||
|
||||
readonly property real minTooltipY: {
|
||||
if (!parentScreen || !(axis?.isVertical ?? false)) {
|
||||
return 0;
|
||||
@@ -68,8 +75,9 @@ BasePill {
|
||||
function openTabByIndex(tabIndex) {
|
||||
if (tabIndex < 0)
|
||||
return;
|
||||
if (root.notepadInstance && typeof root.notepadInstance.show === "function") {
|
||||
root.notepadInstance.show();
|
||||
const instance = prepareNotepadInstance(root.notepadInstance);
|
||||
if (instance && typeof instance.show === "function") {
|
||||
instance.show();
|
||||
}
|
||||
Qt.callLater(() => {
|
||||
NotepadStorageService.switchToTab(tabIndex);
|
||||
@@ -77,8 +85,9 @@ BasePill {
|
||||
}
|
||||
|
||||
function openNewNote() {
|
||||
if (root.notepadInstance && typeof root.notepadInstance.show === "function") {
|
||||
root.notepadInstance.show();
|
||||
const instance = prepareNotepadInstance(root.notepadInstance);
|
||||
if (instance && typeof instance.show === "function") {
|
||||
instance.show();
|
||||
}
|
||||
Qt.callLater(() => {
|
||||
NotepadStorageService.createNewTab();
|
||||
@@ -138,7 +147,7 @@ BasePill {
|
||||
openContextMenu();
|
||||
return;
|
||||
}
|
||||
const inst = root.notepadInstance;
|
||||
const inst = prepareNotepadInstance(root.notepadInstance);
|
||||
if (inst) {
|
||||
inst.toggle();
|
||||
}
|
||||
|
||||
@@ -978,7 +978,7 @@ BasePill {
|
||||
|
||||
visible: root.useOverflowPopup && root.menuOpen
|
||||
screen: root.parentScreen
|
||||
WlrLayershell.layer: WlrLayershell.Top
|
||||
WlrLayershell.layer: root.barUsesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top
|
||||
WlrLayershell.exclusiveZone: -1
|
||||
WlrLayershell.keyboardFocus: {
|
||||
if (!root.menuOpen)
|
||||
@@ -1446,7 +1446,7 @@ BasePill {
|
||||
WlrLayershell.namespace: "dms:tray-menu-window"
|
||||
visible: menuRoot.showMenu && (menuRoot.trayItem?.hasMenu ?? false)
|
||||
screen: menuRoot.parentScreen
|
||||
WlrLayershell.layer: WlrLayershell.Top
|
||||
WlrLayershell.layer: root.barUsesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top
|
||||
WlrLayershell.exclusiveZone: -1
|
||||
WlrLayershell.keyboardFocus: {
|
||||
if (!menuRoot.showMenu)
|
||||
|
||||
@@ -20,16 +20,16 @@ Variants {
|
||||
|
||||
WindowBlur {
|
||||
targetWindow: dock
|
||||
blurEnabled: dock.effectiveBlurEnabled && !SettingsData.connectedFrameModeActive
|
||||
blurEnabled: dock.effectiveBlurEnabled && !dock.usesConnectedFrameChrome
|
||||
blurX: dockBackground.x + dockContainer.x + dockMouseArea.x + dockCore.x + dockSlide.x
|
||||
blurY: dockBackground.y + dockContainer.y + dockMouseArea.y + dockCore.y + dockSlide.y
|
||||
blurWidth: dock.hasApps && dock.reveal ? dockBackground.width : 0
|
||||
blurHeight: dock.hasApps && dock.reveal ? dockBackground.height : 0
|
||||
blurRadius: Theme.isConnectedEffect ? Theme.connectedCornerRadius : dock.surfaceRadius
|
||||
blurRadius: dock.usesConnectedFrameChrome ? Theme.connectedCornerRadius : dock.surfaceRadius
|
||||
}
|
||||
|
||||
WlrLayershell.namespace: "dms:dock"
|
||||
WlrLayershell.layer: SettingsData.frameEnabled && !dock.hasFullscreenToplevel ? WlrLayer.Overlay : WlrLayer.Top
|
||||
WlrLayershell.layer: dock.usesOverlayLayer ? WlrLayer.Overlay : WlrLayer.Top
|
||||
|
||||
readonly property bool isVertical: SettingsData.dockPosition === SettingsData.Position.Left || SettingsData.dockPosition === SettingsData.Position.Right
|
||||
|
||||
@@ -50,16 +50,16 @@ Variants {
|
||||
readonly property bool connectedBarActiveOnEdge: dockGeometry.connectedBarActiveOnEdge
|
||||
readonly property real connectedJoinInset: dockGeometry.connectedJoinInset
|
||||
readonly property real dockFrameInset: dockGeometry.frameInset
|
||||
readonly property real surfaceRadius: Theme.connectedSurfaceRadius
|
||||
readonly property color surfaceColor: Theme.isConnectedEffect ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, backgroundTransparency)
|
||||
readonly property color surfaceBorderColor: Theme.isConnectedEffect ? "transparent" : BlurService.borderColor
|
||||
readonly property real surfaceBorderWidth: Theme.isConnectedEffect ? 0 : BlurService.borderWidth
|
||||
readonly property real surfaceTopLeftRadius: Theme.isConnectedEffect && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius
|
||||
readonly property real surfaceTopRightRadius: Theme.isConnectedEffect && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius
|
||||
readonly property real surfaceBottomLeftRadius: Theme.isConnectedEffect && (SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius
|
||||
readonly property real surfaceBottomRightRadius: Theme.isConnectedEffect && (SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius
|
||||
readonly property real horizontalConnectorExtent: Theme.isConnectedEffect && !isVertical ? Theme.connectedCornerRadius : 0
|
||||
readonly property real verticalConnectorExtent: Theme.isConnectedEffect && isVertical ? Theme.connectedCornerRadius : 0
|
||||
readonly property real surfaceRadius: usesConnectedFrameChrome ? Theme.connectedSurfaceRadius : Theme.cornerRadius
|
||||
readonly property color surfaceColor: usesConnectedFrameChrome ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, backgroundTransparency)
|
||||
readonly property color surfaceBorderColor: usesConnectedFrameChrome ? "transparent" : BlurService.borderColor
|
||||
readonly property real surfaceBorderWidth: usesConnectedFrameChrome ? 0 : BlurService.borderWidth
|
||||
readonly property real surfaceTopLeftRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius
|
||||
readonly property real surfaceTopRightRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius
|
||||
readonly property real surfaceBottomLeftRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius
|
||||
readonly property real surfaceBottomRightRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius
|
||||
readonly property real horizontalConnectorExtent: usesConnectedFrameChrome && !isVertical ? Theme.connectedCornerRadius : 0
|
||||
readonly property real verticalConnectorExtent: usesConnectedFrameChrome && isVertical ? Theme.connectedCornerRadius : 0
|
||||
|
||||
readonly property int hasApps: dockApps.implicitWidth > 0 || dockApps.implicitHeight > 0
|
||||
|
||||
@@ -149,7 +149,6 @@ Variants {
|
||||
edge: dock.connectedBarSide
|
||||
dockVisible: dock.visible
|
||||
autoHide: dock.autoHide
|
||||
hasFullscreenToplevel: dock.hasFullscreenToplevel
|
||||
iconSize: dock.widgetHeight
|
||||
spacing: SettingsData.dockSpacing
|
||||
borderThickness: dock.borderThickness
|
||||
@@ -176,25 +175,13 @@ Variants {
|
||||
}
|
||||
|
||||
readonly property string _dockScreenName: dock.modelData ? dock.modelData.name : (dock.screen ? dock.screen.name : "")
|
||||
readonly property bool hasFullscreenToplevel: {
|
||||
if (!SettingsData.dockHideOnFullscreen)
|
||||
return false;
|
||||
CompositorService.sortedToplevels;
|
||||
ToplevelManager.activeToplevel;
|
||||
if (CompositorService.isNiri) {
|
||||
NiriService.currentOutput;
|
||||
NiriService.windows;
|
||||
NiriService.allWorkspaces;
|
||||
}
|
||||
if (CompositorService.isHyprland)
|
||||
Hyprland.focusedWorkspace;
|
||||
return CompositorService.hasFullscreenToplevelOnScreen(dock._dockScreenName);
|
||||
}
|
||||
readonly property bool usesConnectedFrameChrome: CompositorService.usesConnectedFrameChromeForScreen(dock._dockScreenName)
|
||||
readonly property bool usesOverlayLayer: CompositorService.framePeerSurfacesUseOverlayForScreen(dock._dockScreenName) || SettingsData.dockShowOverFullscreen
|
||||
|
||||
function _syncDockChromeState() {
|
||||
if (!dock._dockScreenName)
|
||||
return;
|
||||
if (!SettingsData.connectedFrameModeActive) {
|
||||
if (!dock.usesConnectedFrameChrome) {
|
||||
ConnectedModeState.clearDockState(dock._dockScreenName);
|
||||
return;
|
||||
}
|
||||
@@ -212,19 +199,19 @@ Variants {
|
||||
}
|
||||
|
||||
function _syncDockSlide() {
|
||||
if (!dock._dockScreenName || !SettingsData.connectedFrameModeActive)
|
||||
if (!dock._dockScreenName || !dock.usesConnectedFrameChrome)
|
||||
return;
|
||||
ConnectedModeState.setDockSlide(dock._dockScreenName, dockSlide.x, dockSlide.y);
|
||||
}
|
||||
|
||||
DeferredAction {
|
||||
id: dockSlideSync
|
||||
enabled: SettingsData.connectedFrameModeActive
|
||||
enabled: dock.usesConnectedFrameChrome
|
||||
onTriggered: dock._syncDockSlide()
|
||||
}
|
||||
|
||||
function _queueSlideSync() {
|
||||
if (!SettingsData.connectedFrameModeActive)
|
||||
if (!dock.usesConnectedFrameChrome)
|
||||
return;
|
||||
dockSlideSync.schedule();
|
||||
}
|
||||
@@ -304,65 +291,10 @@ Variants {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Hyprland implementation
|
||||
// Hyprland implementation (current workspace + visible special workspaces)
|
||||
Hyprland.focusedWorkspace;
|
||||
const filtered = CompositorService.filterCurrentWorkspace(CompositorService.sortedToplevels, screenName);
|
||||
|
||||
if (filtered.length === 0)
|
||||
return false;
|
||||
|
||||
for (let i = 0; i < filtered.length; i++) {
|
||||
const toplevel = filtered[i];
|
||||
|
||||
let hyprToplevel = null;
|
||||
if (Hyprland.toplevels) {
|
||||
const hyprToplevels = Array.from(Hyprland.toplevels.values);
|
||||
for (let j = 0; j < hyprToplevels.length; j++) {
|
||||
if (hyprToplevels[j].wayland === toplevel) {
|
||||
hyprToplevel = hyprToplevels[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!hyprToplevel?.lastIpcObject)
|
||||
continue;
|
||||
|
||||
const ipc = hyprToplevel.lastIpcObject;
|
||||
const at = ipc.at;
|
||||
const size = ipc.size;
|
||||
if (!at || !size)
|
||||
continue;
|
||||
|
||||
const monX = hyprToplevel.monitor?.x ?? 0;
|
||||
const monY = hyprToplevel.monitor?.y ?? 0;
|
||||
|
||||
const winX = at[0] - monX;
|
||||
const winY = at[1] - monY;
|
||||
const winW = size[0];
|
||||
const winH = size[1];
|
||||
|
||||
switch (SettingsData.dockPosition) {
|
||||
case SettingsData.Position.Top:
|
||||
if (winY < dockThickness)
|
||||
return true;
|
||||
break;
|
||||
case SettingsData.Position.Bottom:
|
||||
if (winY + winH > screenHeight - dockThickness)
|
||||
return true;
|
||||
break;
|
||||
case SettingsData.Position.Left:
|
||||
if (winX < dockThickness)
|
||||
return true;
|
||||
break;
|
||||
case SettingsData.Position.Right:
|
||||
if (winX + winW > screenWidth - dockThickness)
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
Hyprland.toplevels;
|
||||
return CompositorService.hyprlandDockOverlapForSmartAutoHide(screenName, SettingsData.dockPosition, dockThickness, screenWidth, screenHeight);
|
||||
}
|
||||
|
||||
Timer {
|
||||
@@ -383,9 +315,6 @@ Variants {
|
||||
if (_modalRetractActive)
|
||||
return false;
|
||||
|
||||
if (dock.hasFullscreenToplevel)
|
||||
return false;
|
||||
|
||||
if (CompositorService.isNiri && NiriService.inOverview && SettingsData.dockOpenOnOverview) {
|
||||
return true;
|
||||
}
|
||||
@@ -421,7 +350,7 @@ Variants {
|
||||
onVisibleChanged: dock._syncDockChromeState()
|
||||
onHasAppsChanged: dock._syncDockChromeState()
|
||||
onConnectedBarSideChanged: dock._syncDockChromeState()
|
||||
onHasFullscreenToplevelChanged: dock._syncDockChromeState()
|
||||
onUsesConnectedFrameChromeChanged: dock._syncDockChromeState()
|
||||
|
||||
Connections {
|
||||
target: SettingsData
|
||||
@@ -680,7 +609,7 @@ Variants {
|
||||
return 0;
|
||||
if (dock.reveal)
|
||||
return 0;
|
||||
if (Theme.isConnectedEffect) {
|
||||
if (dock.usesConnectedFrameChrome) {
|
||||
const retractDist = dockBackground.width + SettingsData.dockSpacing + 10;
|
||||
return SettingsData.dockPosition === SettingsData.Position.Right ? retractDist : -retractDist;
|
||||
}
|
||||
@@ -696,7 +625,7 @@ Variants {
|
||||
return 0;
|
||||
if (dock.reveal)
|
||||
return 0;
|
||||
if (Theme.isConnectedEffect) {
|
||||
if (dock.usesConnectedFrameChrome) {
|
||||
const retractDist = dockBackground.height + SettingsData.dockSpacing + 10;
|
||||
return SettingsData.dockPosition === SettingsData.Position.Bottom ? retractDist : -retractDist;
|
||||
}
|
||||
@@ -711,9 +640,9 @@ Variants {
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
id: slideXAnimation
|
||||
duration: Theme.isConnectedEffect ? Theme.variantDuration(Theme.popoutAnimationDuration, dock.reveal) : Theme.shortDuration
|
||||
easing.type: Theme.isConnectedEffect ? Easing.BezierSpline : Easing.OutCubic
|
||||
easing.bezierCurve: Theme.isConnectedEffect ? (dock.reveal ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : []
|
||||
duration: dock.usesConnectedFrameChrome ? Theme.variantDuration(Theme.popoutAnimationDuration, dock.reveal) : Theme.shortDuration
|
||||
easing.type: dock.usesConnectedFrameChrome ? Easing.BezierSpline : Easing.OutCubic
|
||||
easing.bezierCurve: dock.usesConnectedFrameChrome ? (dock.reveal ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : []
|
||||
onRunningChanged: if (!running)
|
||||
dock._syncDockChromeState()
|
||||
}
|
||||
@@ -722,9 +651,9 @@ Variants {
|
||||
Behavior on y {
|
||||
NumberAnimation {
|
||||
id: slideYAnimation
|
||||
duration: Theme.isConnectedEffect ? Theme.variantDuration(Theme.popoutAnimationDuration, dock.reveal) : Theme.shortDuration
|
||||
easing.type: Theme.isConnectedEffect ? Easing.BezierSpline : Easing.OutCubic
|
||||
easing.bezierCurve: Theme.isConnectedEffect ? (dock.reveal ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : []
|
||||
duration: dock.usesConnectedFrameChrome ? Theme.variantDuration(Theme.popoutAnimationDuration, dock.reveal) : Theme.shortDuration
|
||||
easing.type: dock.usesConnectedFrameChrome ? Easing.BezierSpline : Easing.OutCubic
|
||||
easing.bezierCurve: dock.usesConnectedFrameChrome ? (dock.reveal ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : []
|
||||
onRunningChanged: if (!running)
|
||||
dock._syncDockChromeState()
|
||||
}
|
||||
@@ -756,12 +685,12 @@ Variants {
|
||||
height: implicitHeight
|
||||
|
||||
// Avoid an offscreen texture seam where the connected dock meets the frame.
|
||||
layer.enabled: !Theme.isConnectedEffect
|
||||
layer.enabled: !usesConnectedFrameChrome
|
||||
clip: false
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
visible: !SettingsData.connectedFrameModeActive && !(Theme.isConnectedEffect && dock.reveal)
|
||||
visible: !usesConnectedFrameChrome && (!SettingsData.connectedFrameModeActive || dock.reveal)
|
||||
color: dock.surfaceColor
|
||||
topLeftRadius: dock.surfaceTopLeftRadius
|
||||
topRightRadius: dock.surfaceTopRightRadius
|
||||
@@ -771,7 +700,7 @@ Variants {
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
visible: !SettingsData.connectedFrameModeActive && !(Theme.isConnectedEffect && dock.reveal)
|
||||
visible: !usesConnectedFrameChrome && (!SettingsData.connectedFrameModeActive || dock.reveal)
|
||||
color: "transparent"
|
||||
topLeftRadius: dock.surfaceTopLeftRadius
|
||||
topRightRadius: dock.surfaceTopRightRadius
|
||||
@@ -807,7 +736,7 @@ Variants {
|
||||
y: dockBackground.y - borderThickness
|
||||
width: dockBackground.width + borderThickness * 2
|
||||
height: dockBackground.height + borderThickness * 2
|
||||
visible: SettingsData.dockBorderEnabled && dock.hasApps && !Theme.isConnectedEffect
|
||||
visible: SettingsData.dockBorderEnabled && dock.hasApps && !usesConnectedFrameChrome
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
|
||||
readonly property real borderThickness: Math.max(1, dock.borderThickness)
|
||||
@@ -883,6 +812,7 @@ Variants {
|
||||
isVertical: dock.isVertical
|
||||
dockScreen: dock.screen
|
||||
iconSize: dock.widgetHeight
|
||||
usesOverlayLayer: dock.usesOverlayLayer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ Item {
|
||||
property bool isVertical: false
|
||||
property var dockScreen: null
|
||||
property real iconSize: 40
|
||||
property bool usesOverlayLayer: false
|
||||
property int draggedIndex: -1
|
||||
property int dropTargetIndex: -1
|
||||
property bool suppressShiftAnimation: false
|
||||
|
||||
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
@@ -10,7 +11,6 @@ QtObject {
|
||||
property string edge: "bottom"
|
||||
property bool dockVisible: false
|
||||
property bool autoHide: false
|
||||
property bool hasFullscreenToplevel: false
|
||||
property real iconSize: 40
|
||||
property real spacing: 4
|
||||
property real borderThickness: 0
|
||||
@@ -23,14 +23,14 @@ QtObject {
|
||||
return Math.round(value * dpr) / dpr;
|
||||
}
|
||||
|
||||
readonly property bool frameExclusionActive: SettingsData.frameEnabled && !!screen && SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences)
|
||||
readonly property bool connectedMode: Theme.isConnectedEffect
|
||||
readonly property bool connectedBarActiveOnEdge: connectedMode && !!screen && SettingsData.getActiveBarEdgesForScreen(screen).includes(edge)
|
||||
readonly property bool frameExclusionActive: CompositorService.frameWindowVisibleForScreen(screen)
|
||||
readonly property bool usesConnectedFrameChrome: CompositorService.usesConnectedFrameChromeForScreen(screen)
|
||||
readonly property bool connectedBarActiveOnEdge: usesConnectedFrameChrome && !!screen && SettingsData.getActiveBarEdgesForScreen(screen).includes(edge)
|
||||
|
||||
readonly property real connectedJoinInset: {
|
||||
if (connectedMode)
|
||||
if (usesConnectedFrameChrome)
|
||||
return connectedBarActiveOnEdge ? SettingsData.frameBarSize : SettingsData.frameThickness;
|
||||
if (SettingsData.frameEnabled)
|
||||
if (frameExclusionActive)
|
||||
return SettingsData.frameEdgeInsetForSide(screen, edge);
|
||||
return 0;
|
||||
}
|
||||
@@ -38,15 +38,15 @@ QtObject {
|
||||
readonly property real frameInset: {
|
||||
if (!frameExclusionActive)
|
||||
return 0;
|
||||
if (connectedMode)
|
||||
if (usesConnectedFrameChrome)
|
||||
return connectedJoinInset;
|
||||
return SettingsData.frameThickness;
|
||||
}
|
||||
|
||||
readonly property real effectiveMargin: connectedMode ? 0 : margin
|
||||
readonly property real visualOffset: connectedMode ? 0 : offset
|
||||
readonly property real effectiveMargin: usesConnectedFrameChrome ? 0 : margin
|
||||
readonly property real visualOffset: usesConnectedFrameChrome ? 0 : offset
|
||||
readonly property real reserveOffset: offset
|
||||
readonly property real joinedEdgeMargin: connectedMode ? 0 : (barSpacing + effectiveMargin + 1 + borderThickness)
|
||||
readonly property real joinedEdgeMargin: usesConnectedFrameChrome ? 0 : (barSpacing + effectiveMargin + 1 + borderThickness)
|
||||
readonly property real bodyEdgeMargin: frameInset + joinedEdgeMargin
|
||||
|
||||
readonly property real bodyThickness: iconSize + spacing * 2 + borderThickness * 2
|
||||
@@ -57,5 +57,5 @@ QtObject {
|
||||
// Frame/bar edge exclusions already reserve the edge itself, so the dock
|
||||
// reservation covers only the dock body and user offset beyond that edge.
|
||||
readonly property real reserveZone: px(bodyThickness + reserveOffset + effectiveMargin)
|
||||
readonly property bool shouldReserveSpace: dockVisible && !hasFullscreenToplevel && !autoHide && barSpacing <= 0
|
||||
readonly property bool shouldReserveSpace: dockVisible && !autoHide && barSpacing <= 0
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ Item {
|
||||
if (wasDragging || mouse.button !== Qt.LeftButton)
|
||||
return;
|
||||
|
||||
PopoutService.toggleDankLauncherV2();
|
||||
PopoutService.toggleDankLauncherV2(dockApps?.usesOverlayLayer ?? false);
|
||||
}
|
||||
onPositionChanged: mouse => {
|
||||
if (longPressing && !dragging) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
|
||||
Scope {
|
||||
id: root
|
||||
@@ -18,7 +19,7 @@ Scope {
|
||||
// One thin invisible PanelWindow per edge.
|
||||
// Skips any edge where a bar already provides its own exclusiveZone.
|
||||
|
||||
readonly property bool screenEnabled: SettingsData.frameEnabled && SettingsData.isScreenInPreferences(root.screen, SettingsData.frameScreenPreferences)
|
||||
readonly property bool screenEnabled: CompositorService.frameWindowVisibleForScreen(root.screen)
|
||||
|
||||
Loader {
|
||||
active: root.screenEnabled && !root.barEdges.includes("top")
|
||||
|
||||
@@ -17,8 +17,9 @@ PanelWindow {
|
||||
required property var targetScreen
|
||||
|
||||
screen: targetScreen
|
||||
visible: _frameActive
|
||||
updatesEnabled: _frameActive
|
||||
readonly property bool _frameVisible: CompositorService.frameWindowVisibleForScreen(win.targetScreen)
|
||||
visible: win._frameVisible
|
||||
updatesEnabled: win._frameVisible
|
||||
|
||||
WlrLayershell.namespace: "dms:frame"
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
@@ -52,7 +53,7 @@ PanelWindow {
|
||||
readonly property var _notifState: ConnectedModeState.notificationStates[win._screenName] || ConnectedModeState.emptyNotificationState
|
||||
readonly property var _modalState: ConnectedModeState.modalStates[win._screenName] || ConnectedModeState.emptyModalState
|
||||
|
||||
readonly property bool _connectedActive: win._frameActive && SettingsData.connectedFrameModeActive
|
||||
readonly property bool _connectedActive: CompositorService.usesConnectedFrameChromeForScreen(win.targetScreen)
|
||||
readonly property string _barSide: {
|
||||
const edges = win.barEdges;
|
||||
if (edges.includes("top"))
|
||||
|
||||
@@ -10,7 +10,7 @@ import qs.Widgets
|
||||
PanelWindow {
|
||||
id: win
|
||||
|
||||
readonly property bool connectedFrameMode: SettingsData.frameEnabled && Theme.isConnectedEffect && SettingsData.isScreenInPreferences(win.screen, SettingsData.frameScreenPreferences)
|
||||
readonly property bool connectedFrameMode: CompositorService.usesConnectedFrameChromeForScreen(win.screen)
|
||||
readonly property string notifBarSide: {
|
||||
const pos = SettingsData.notificationPopupPosition;
|
||||
if (pos === -1)
|
||||
@@ -370,9 +370,9 @@ PanelWindow {
|
||||
return Math.max(0, Math.round(Theme.px(raw, dpr)));
|
||||
}
|
||||
|
||||
readonly property bool frameOnlyNoConnected: SettingsData.frameEnabled && !connectedFrameMode && !!screen && SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences)
|
||||
readonly property bool frameVisibleWithoutConnectedChrome: CompositorService.frameWindowVisibleForScreen(screen) && !connectedFrameMode
|
||||
|
||||
// Frame ON + Connected OFF. frameEdgeInset is the full bar/frame inset
|
||||
// Frame visible without connected chrome. frameEdgeInset is the full bar/frame inset.
|
||||
function _frameGapMargin(side) {
|
||||
return _frameEdgeInset(side) + Theme.popupDistance;
|
||||
}
|
||||
@@ -387,7 +387,7 @@ PanelWindow {
|
||||
const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) ? 0 : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr));
|
||||
return _frameEdgeInset("top") + cornerClear + screenY;
|
||||
}
|
||||
if (frameOnlyNoConnected)
|
||||
if (frameVisibleWithoutConnectedChrome)
|
||||
return _frameGapMargin("top") + screenY;
|
||||
const barInfo = getBarInfo();
|
||||
const base = barInfo.topBar > 0 ? barInfo.topBar : Theme.popupDistance;
|
||||
@@ -404,7 +404,7 @@ PanelWindow {
|
||||
const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) ? 0 : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr));
|
||||
return _frameEdgeInset("bottom") + cornerClear + screenY;
|
||||
}
|
||||
if (frameOnlyNoConnected)
|
||||
if (frameVisibleWithoutConnectedChrome)
|
||||
return _frameGapMargin("bottom") + screenY;
|
||||
const barInfo = getBarInfo();
|
||||
const base = barInfo.bottomBar > 0 ? barInfo.bottomBar : Theme.popupDistance;
|
||||
@@ -422,7 +422,7 @@ PanelWindow {
|
||||
|
||||
if (connectedFrameMode)
|
||||
return _frameEdgeInset("left");
|
||||
if (frameOnlyNoConnected)
|
||||
if (frameVisibleWithoutConnectedChrome)
|
||||
return _frameGapMargin("left");
|
||||
const barInfo = getBarInfo();
|
||||
return barInfo.leftBar > 0 ? barInfo.leftBar : Theme.popupDistance;
|
||||
@@ -439,7 +439,7 @@ PanelWindow {
|
||||
|
||||
if (connectedFrameMode)
|
||||
return _frameEdgeInset("right");
|
||||
if (frameOnlyNoConnected)
|
||||
if (frameVisibleWithoutConnectedChrome)
|
||||
return _frameGapMargin("right");
|
||||
const barInfo = getBarInfo();
|
||||
return barInfo.rightBar > 0 ? barInfo.rightBar : Theme.popupDistance;
|
||||
|
||||
@@ -10,7 +10,7 @@ QtObject {
|
||||
property var modelData
|
||||
property int topMargin: 0
|
||||
readonly property bool compactMode: SettingsData.notificationCompactMode
|
||||
readonly property bool notificationConnectedMode: SettingsData.frameEnabled && Theme.isConnectedEffect && SettingsData.isScreenInPreferences(manager.modelData, SettingsData.frameScreenPreferences)
|
||||
readonly property bool notificationConnectedMode: CompositorService.usesConnectedFrameChromeForScreen(manager.modelData)
|
||||
readonly property bool closeGapNotifications: notificationConnectedMode && SettingsData.frameCloseGaps
|
||||
readonly property string notifBarSide: {
|
||||
const pos = SettingsData.notificationPopupPosition;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
@@ -38,6 +39,18 @@ Item {
|
||||
readonly property real rightMargin: !isVerticalOrientation ? (isRightBarEdge && isLast ? barEdgeExtension : (isLast ? gapExtension : gapExtension / 2)) : 0
|
||||
readonly property real topMargin: isVerticalOrientation ? (isTopBarEdge && isFirst ? barEdgeExtension : (isFirst ? gapExtension : gapExtension / 2)) : 0
|
||||
readonly property real bottomMargin: isVerticalOrientation ? (isBottomBarEdge && isLast ? barEdgeExtension : (isLast ? gapExtension : gapExtension / 2)) : 0
|
||||
readonly property bool barUsesOverlayLayer: {
|
||||
switch (Quickshell.env("DMS_DANKBAR_LAYER")) {
|
||||
case "overlay":
|
||||
return true;
|
||||
case "bottom":
|
||||
case "background":
|
||||
case "top":
|
||||
return false;
|
||||
default:
|
||||
return (barConfig?.showOverFullscreen ?? false) || CompositorService.framePeerSurfacesUseOverlayForScreen(parentScreen);
|
||||
}
|
||||
}
|
||||
|
||||
signal clicked
|
||||
signal rightClicked(real rootX, real rootY)
|
||||
|
||||
@@ -137,7 +137,7 @@ Item {
|
||||
popupGapsAuto: defaultBar.popupGapsAuto ?? true,
|
||||
popupGapsManual: defaultBar.popupGapsManual ?? 4,
|
||||
maximizeDetection: defaultBar.maximizeDetection ?? true,
|
||||
fullscreenDetection: defaultBar.fullscreenDetection ?? true,
|
||||
showOverFullscreen: defaultBar.showOverFullscreen ?? false,
|
||||
scrollEnabled: defaultBar.scrollEnabled ?? true,
|
||||
scrollXBehavior: defaultBar.scrollXBehavior ?? "column",
|
||||
scrollYBehavior: defaultBar.scrollYBehavior ?? "workspace",
|
||||
@@ -729,11 +729,14 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
text: I18n.tr("Hide When Fullscreen", "bar visibility toggle: hide the bar when a window is fullscreen")
|
||||
checked: selectedBarConfig?.fullscreenDetection ?? true
|
||||
settingKey: "barShowOverFullscreen"
|
||||
tags: ["bar", "fullscreen", "overlay", "layer"]
|
||||
text: I18n.tr("Show Over Fullscreen", "bar layer toggle: show the bar over fullscreen windows")
|
||||
description: I18n.tr("Use the overlay layer so this bar appears above fullscreen windows")
|
||||
checked: selectedBarConfig?.showOverFullscreen ?? false
|
||||
onToggled: toggled => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
fullscreenDetection: toggled
|
||||
showOverFullscreen: toggled
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
@@ -90,13 +90,13 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "dockHideOnFullscreen"
|
||||
tags: ["dock", "fullscreen", "hide"]
|
||||
text: I18n.tr("Hide When Fullscreen", "dock visibility toggle: hide the dock when a window is fullscreen")
|
||||
description: I18n.tr("Hide the dock when a window is fullscreen", "dock visibility toggle description")
|
||||
checked: SettingsData.dockHideOnFullscreen
|
||||
settingKey: "dockShowOverFullscreen"
|
||||
tags: ["dock", "fullscreen", "overlay", "layer"]
|
||||
text: I18n.tr("Show Over Fullscreen", "dock layer toggle: show the dock over fullscreen windows")
|
||||
description: I18n.tr("Use the overlay layer so the dock appears above fullscreen windows")
|
||||
checked: SettingsData.dockShowOverFullscreen
|
||||
visible: SettingsData.showDock
|
||||
onToggled: checked => SettingsData.set("dockHideOnFullscreen", checked)
|
||||
onToggled: checked => SettingsData.set("dockShowOverFullscreen", checked)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,15 @@ Item {
|
||||
SettingsData.set("launcherStyle", index === 1 ? "spotlight" : "full");
|
||||
}
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "launcherShowOverFullscreen"
|
||||
tags: ["launcher", "fullscreen", "overlay", "layer"]
|
||||
text: I18n.tr("Show Over Fullscreen", "launcher layer toggle: show the launcher over fullscreen windows")
|
||||
description: I18n.tr("Use the overlay layer when opening the launcher")
|
||||
checked: SettingsData.launcherShowOverFullscreen
|
||||
onToggled: checked => SettingsData.set("launcherShowOverFullscreen", checked)
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
|
||||
Reference in New Issue
Block a user