diff --git a/quickshell/Modules/Plugins/PopoutComponent.qml b/quickshell/Modules/Plugins/PopoutComponent.qml index 45702a82..5567f3f9 100644 --- a/quickshell/Modules/Plugins/PopoutComponent.qml +++ b/quickshell/Modules/Plugins/PopoutComponent.qml @@ -9,6 +9,7 @@ Column { property string detailsText: "" property bool showCloseButton: false property var closePopout: null + property alias headerActions: headerActionsLoader.sourceComponent readonly property int headerHeight: popoutHeader.visible ? popoutHeader.height : 0 readonly property int detailsHeight: popoutDetails.visible ? popoutDetails.implicitHeight : 0 @@ -31,31 +32,40 @@ Column { color: Theme.surfaceText } - Rectangle { - id: closeButton - width: 32 - height: 32 - radius: 16 + Row { anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - color: closeArea.containsMouse ? Theme.errorHover : "transparent" - visible: root.showCloseButton + spacing: Theme.spacingXS - DankIcon { - anchors.centerIn: parent - name: "close" - size: Theme.iconSize - 4 - color: closeArea.containsMouse ? Theme.error : Theme.surfaceText + Loader { + id: headerActionsLoader + anchors.verticalCenter: parent.verticalCenter } - MouseArea { - id: closeArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onPressed: { - if (root.closePopout) { - root.closePopout(); + Rectangle { + id: closeButton + width: 32 + height: 32 + radius: 16 + color: closeArea.containsMouse ? Theme.errorHover : "transparent" + visible: root.showCloseButton + + DankIcon { + anchors.centerIn: parent + name: "close" + size: Theme.iconSize - 4 + color: closeArea.containsMouse ? Theme.error : Theme.surfaceText + } + + MouseArea { + id: closeArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onPressed: { + if (root.closePopout) { + root.closePopout(); + } } } }