forked from Shinonome/dots-hyprland
fix media controls positioning for vertical bar
This commit is contained in:
@@ -111,21 +111,24 @@ Scope {
|
|||||||
|
|
||||||
exclusionMode: ExclusionMode.Ignore
|
exclusionMode: ExclusionMode.Ignore
|
||||||
exclusiveZone: 0
|
exclusiveZone: 0
|
||||||
margins {
|
|
||||||
top: Appearance.sizes.barHeight
|
|
||||||
bottom: Appearance.sizes.barHeight
|
|
||||||
left: (mediaControlsRoot.screen.width / 2) - (osdWidth / 2) - widgetWidth
|
|
||||||
}
|
|
||||||
implicitWidth: root.widgetWidth
|
implicitWidth: root.widgetWidth
|
||||||
implicitHeight: playerColumnLayout.implicitHeight
|
implicitHeight: playerColumnLayout.implicitHeight
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
WlrLayershell.namespace: "quickshell:mediaControls"
|
WlrLayershell.namespace: "quickshell:mediaControls"
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top: !Config.options.bar.bottom
|
top: !Config.options.bar.bottom || Config.options.bar.vertical
|
||||||
bottom: Config.options.bar.bottom
|
bottom: Config.options.bar.bottom && !Config.options.bar.vertical
|
||||||
left: true
|
left: !(Config.options.bar.vertical && Config.options.bar.bottom)
|
||||||
|
right: Config.options.bar.vertical && Config.options.bar.bottom
|
||||||
}
|
}
|
||||||
|
margins {
|
||||||
|
top: Config.options.bar.vertical ? ((mediaControlsRoot.screen.height / 2) - widgetHeight * 1.5) : Appearance.sizes.barHeight
|
||||||
|
bottom: Appearance.sizes.barHeight
|
||||||
|
left: Config.options.bar.vertical ? Appearance.sizes.barHeight : ((mediaControlsRoot.screen.width / 2) - (osdWidth / 2) - widgetWidth)
|
||||||
|
right: Appearance.sizes.barHeight
|
||||||
|
}
|
||||||
|
|
||||||
mask: Region {
|
mask: Region {
|
||||||
item: playerColumnLayout
|
item: playerColumnLayout
|
||||||
}
|
}
|
||||||
@@ -143,6 +146,8 @@ Scope {
|
|||||||
required property MprisPlayer modelData
|
required property MprisPlayer modelData
|
||||||
player: modelData
|
player: modelData
|
||||||
visualizerPoints: root.visualizerPoints
|
visualizerPoints: root.visualizerPoints
|
||||||
|
implicitWidth: widgetWidth
|
||||||
|
implicitHeight: widgetHeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ Item { // Player instance
|
|||||||
property real maxVisualizerValue: 1000 // Max value in the data points
|
property real maxVisualizerValue: 1000 // Max value in the data points
|
||||||
property int visualizerSmoothing: 2 // Number of points to average for smoothing
|
property int visualizerSmoothing: 2 // Number of points to average for smoothing
|
||||||
|
|
||||||
implicitWidth: widgetWidth
|
|
||||||
implicitHeight: widgetHeight
|
|
||||||
|
|
||||||
component TrackChangeButton: RippleButton {
|
component TrackChangeButton: RippleButton {
|
||||||
implicitWidth: 24
|
implicitWidth: 24
|
||||||
implicitHeight: 24
|
implicitHeight: 24
|
||||||
|
|||||||
Reference in New Issue
Block a user