diff options
| author | AlexanderCurl <alexc@alexc.hu> | 2026-04-18 17:46:06 +0100 |
|---|---|---|
| committer | AlexanderCurl <alexc@alexc.hu> | 2026-04-18 17:46:06 +0100 |
| commit | 70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 (patch) | |
| tree | ab1123d4067c1b086dd6faa7ee4ea643236b565a /raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/Plugins/PopoutComponent.qml | |
| parent | 5d94c0a7d44a2255b81815a52a7056a94a39842d (diff) | |
| download | RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.tar.gz RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.zip | |
Replaced file structures for themes in the correct format
Diffstat (limited to 'raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/Plugins/PopoutComponent.qml')
| -rw-r--r-- | raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/Plugins/PopoutComponent.qml | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/Plugins/PopoutComponent.qml b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/Plugins/PopoutComponent.qml new file mode 100644 index 0000000..7ccf637 --- /dev/null +++ b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/Plugins/PopoutComponent.qml @@ -0,0 +1,87 @@ +import QtQuick +import qs.Common +import qs.Widgets + +Column { + id: root + + property string headerText: "" + property string detailsText: "" + property bool showCloseButton: false + property var closePopout: null + property var parentPopout: null + property alias headerActions: headerActionsLoader.sourceComponent + + readonly property int headerHeight: popoutHeader.visible ? popoutHeader.height : 0 + readonly property int detailsHeight: popoutDetails.visible ? popoutDetails.implicitHeight : 0 + + spacing: 0 + + Item { + id: popoutHeader + width: parent.width + height: 40 + visible: headerText.length > 0 + + StyledText { + anchors.left: parent.left + anchors.leftMargin: Theme.spacingS + anchors.verticalCenter: parent.verticalCenter + text: root.headerText + font.pixelSize: Theme.fontSizeLarge + 4 + font.weight: Font.Bold + color: Theme.surfaceText + } + + Row { + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + spacing: Theme.spacingXS + + Loader { + id: headerActionsLoader + anchors.verticalCenter: parent.verticalCenter + } + + 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(); + } + } + } + } + } + } + + StyledText { + id: popoutDetails + width: parent.width + leftPadding: Theme.spacingS + bottomPadding: Theme.spacingS + text: root.detailsText + font.pixelSize: Theme.fontSizeMedium + color: Theme.surfaceVariantText + visible: detailsText.length > 0 + wrapMode: Text.WordWrap + } +} |