mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
media: fix position/bar awareness
- shift media control column so it doesnt go off screen fixes #942
This commit is contained in:
@@ -358,6 +358,8 @@ DankPopout {
|
||||
popoutWidth: root.alignedWidth
|
||||
popoutHeight: root.alignedHeight
|
||||
contentOffsetY: Theme.spacingM + 48 + Theme.spacingS + Theme.spacingXS
|
||||
section: root.triggerSection
|
||||
barPosition: root.effectiveBarPosition
|
||||
Component.onCompleted: root.__mediaTabRef = this
|
||||
onShowVolumeDropdown: (pos, screen, rightEdge, player, players) => {
|
||||
root.__showVolumeDropdown(pos, rightEdge, player, players);
|
||||
|
||||
@@ -3,7 +3,6 @@ import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.Mpris
|
||||
import Quickshell.Io
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
@@ -19,6 +18,8 @@ Item {
|
||||
property real popoutWidth: 0
|
||||
property real popoutHeight: 0
|
||||
property real contentOffsetY: 0
|
||||
property string section: ""
|
||||
property int barPosition: SettingsData.Position.Top
|
||||
|
||||
signal showVolumeDropdown(point pos, var screen, bool rightEdge, var player, var players)
|
||||
signal showAudioDevicesDropdown(point pos, var screen, bool rightEdge)
|
||||
@@ -40,7 +41,13 @@ Item {
|
||||
id: sharedTooltip
|
||||
}
|
||||
|
||||
readonly property bool isRightEdge: (SettingsData.barConfigs[0]?.position ?? SettingsData.Position.Top) === SettingsData.Position.Right
|
||||
readonly property bool isRightEdge: {
|
||||
if (barPosition === SettingsData.Position.Right)
|
||||
return true;
|
||||
if (barPosition === SettingsData.Position.Left)
|
||||
return false;
|
||||
return section === "right";
|
||||
}
|
||||
readonly property bool __isChromeBrowser: {
|
||||
if (!activePlayer?.identity)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user