diff --git a/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/HBarWidgetShapeBackground.qml b/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/HBarWidgetShapeBackground.qml index 3f57b56a9..94734e884 100644 --- a/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/HBarWidgetShapeBackground.qml +++ b/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/HBarWidgetShapeBackground.qml @@ -27,15 +27,11 @@ Shapes.ShapeCanvas { required property real startRadius required property real endRadius property real baseMargin: { - print("calculating new base margin (vertical, parent height, container height) = ", vertical, parent.height, containerShape.height) if (!vertical) return parent.anchors.topMargin else return parent.anchors.leftMargin } - onBaseMarginChanged: { - print(baseMargin) - } property alias containerShape: containerShape property alias popupShape: popupShape @@ -88,16 +84,18 @@ Shapes.ShapeCanvas { onPopupYOffsetChanged: if (bgShape.showPopup) lockPopupY = true; // Positioning - readonly property real popupContentOffsetBase: popupPadding + baseMargin + readonly property real popupContentOffsetBase: popupPadding + readonly property real popupContentOffsetBaseX: popupContentOffsetBase + parent.anchors.leftMargin + readonly property real popupContentOffsetBaseY: popupContentOffsetBase + parent.anchors.topMargin readonly property real paddedContainerHeight: containerShape.height readonly property real paddedContainerWidth: containerShape.width - readonly property real popupContentOffsetY: { - if (!vertical) return paddedContainerHeight + spacing + popupContentOffsetBase + (atBottom * -(popupHeight + backgroundHeight + spacing * 2)) - else return popupYOffset + popupContentOffsetBase; - } readonly property real popupContentOffsetX: { - if (!vertical) return popupXOffset + popupContentOffsetBase; - else return paddedContainerWidth + spacing + popupContentOffsetBase + (atBottom * -(popupWidth + backgroundWidth + spacing * 2)); + if (!vertical) return popupXOffset + popupContentOffsetBaseX; + else return paddedContainerWidth + spacing + popupContentOffsetBaseX + (atBottom * -(popupWidth + backgroundWidth + spacing * 2)); + } + readonly property real popupContentOffsetY: { + if (!vertical) return paddedContainerHeight + spacing + popupContentOffsetBaseY + (atBottom * -(popupHeight + backgroundHeight + spacing * 2)) + else return popupYOffset + popupContentOffsetBaseY; } anchors { diff --git a/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HResources.qml b/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HResources.qml index 535cbfb0b..29b18e16a 100644 --- a/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HResources.qml +++ b/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HResources.qml @@ -21,13 +21,14 @@ HBarWidgetWithPopout { HBarWidgetContent { id: contentRoot + vertical: root.vertical atBottom: root.atBottom showPopup: root.showPopup - contentImplicitWidth: activeItem.implicitWidth - contentImplicitHeight: activeItem.implicitHeight onClicked: root.showPopup = !root.showPopup - property var activeItem: sysInfoContent + + contentImplicitWidth: sysInfoContent.implicitWidth + contentImplicitHeight: sysInfoContent.implicitHeight SysInfoContent { id: sysInfoContent @@ -37,9 +38,9 @@ HBarWidgetWithPopout { SysInfoPopupContent { id: popupContent anchors { - top: root.vertical ? contentRoot.activeItem.top : contentRoot.activeItem.top + top: parent.top + left: parent.left topMargin: root.popupContentOffsetY - left: root.vertical ? contentRoot.activeItem.left : contentRoot.activeItem.left leftMargin: root.popupContentOffsetX } diff --git a/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HTime.qml b/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HTime.qml index 7f754722b..490b3000a 100644 --- a/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HTime.qml +++ b/dots/.config/quickshell/ii/modules/hefty/topLayer/bar/widgets/HTime.qml @@ -53,9 +53,9 @@ HBarWidgetWithPopout { PopupContent { id: popupContent anchors { - top: root.vertical ? verticalContent.top : horizontalContent.top + top: parent.top + left: parent.left topMargin: root.popupContentOffsetY - left: root.vertical ? verticalContent.left : horizontalContent.left leftMargin: root.popupContentOffsetX }