mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
hefty: bar: fix some alignment issues for floating
This commit is contained in:
@@ -174,8 +174,8 @@ HAbstractMorphedPanel {
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: undefined
|
||||
left: undefined
|
||||
right: undefined
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
states: [
|
||||
State {
|
||||
|
||||
@@ -22,6 +22,7 @@ Item {
|
||||
anchors.top: parent.top
|
||||
anchors.right: !root.vertical ? centerLeftSide.left : parent.right
|
||||
anchors.bottom: !root.vertical ? parent.bottom : centerLeftSide.top
|
||||
anchors.leftMargin: 0 // For accessibility
|
||||
|
||||
HBarUserFallbackComponentRepeater {
|
||||
componentNames: root.leftWidgets
|
||||
@@ -66,6 +67,7 @@ Item {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: !root.vertical ? centerRightSide.right : parent.left
|
||||
anchors.top: !root.vertical ? parent.top : centerRightSide.bottom
|
||||
anchors.rightMargin: 0 // For accessibility
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
|
||||
+3
-3
@@ -8,11 +8,11 @@ import qs.modules.common.widgets as W
|
||||
Repeater {
|
||||
id: root
|
||||
|
||||
readonly property bool vertical: C.Config.options.bar.vertical
|
||||
readonly property string invisibleItem: "_invisible"
|
||||
required property list<var> componentNames
|
||||
property string context: Quickshell.shellPath("modules/hefty/topLayer/bar/widgets")
|
||||
|
||||
|
||||
model: {
|
||||
const m = componentNames.map(item => {
|
||||
if (item instanceof Array)
|
||||
@@ -50,8 +50,8 @@ Repeater {
|
||||
property bool startSide: index === 0
|
||||
property bool endSide: index === root.model.length - 1
|
||||
|
||||
Layout.fillWidth: item.Layout.fillWidth
|
||||
Layout.fillHeight: item.Layout.fillHeight
|
||||
Layout.fillWidth: root.vertical ? true : item.Layout.fillWidth
|
||||
Layout.fillHeight: !root.vertical ? true : item.Layout.fillHeight
|
||||
Layout.maximumWidth: item.Layout.maximumWidth
|
||||
Layout.maximumHeight: item.Layout.maximumHeight
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ W.ButtonMouseArea {
|
||||
property real layoutParentBottomRightRadius: layoutParent.bottomRightRadius
|
||||
|
||||
readonly property real barThickness: vertical ? C.Appearance.sizes.verticalBarWidth : C.Appearance.sizes.barHeight
|
||||
readonly property real barVisualThickness: vertical ? C.Appearance.sizes.baseVerticalBarWidth : C.Appearance.sizes.baseBarHeight
|
||||
readonly property real barGap: (barThickness - barVisualThickness) / 2
|
||||
required property real contentImplicitWidth
|
||||
required property real contentImplicitHeight
|
||||
property real parentRadiusToPaddingRatio: 0.3
|
||||
@@ -33,7 +35,7 @@ W.ButtonMouseArea {
|
||||
W.StateOverlay {
|
||||
id: hoverOverlay
|
||||
anchors.fill: parent
|
||||
property real parentMargins: 4
|
||||
property real parentMargins: 4 + root.barGap
|
||||
property real ownMargins: 2
|
||||
property real edgeMargins: parentMargins + ownMargins
|
||||
property real sideMargins: -2
|
||||
|
||||
@@ -33,7 +33,7 @@ HBarWidgetWithPopout {
|
||||
|
||||
property real fontPixelSize: Appearance.font.pixelSize.smaller
|
||||
|
||||
Layout.maximumWidth: implicitWidth
|
||||
Layout.maximumWidth: vertical ? -1 : implicitWidth
|
||||
Layout.fillWidth: true
|
||||
|
||||
popupContentWidth: popupContent.implicitWidth
|
||||
|
||||
Reference in New Issue
Block a user