diff --git a/containments/homescreens/folio/qml/AppDrawerHeader.qml b/containments/homescreens/folio/qml/AppDrawerHeader.qml index 688d968e..60268ad8 100644 --- a/containments/homescreens/folio/qml/AppDrawerHeader.qml +++ b/containments/homescreens/folio/qml/AppDrawerHeader.qml @@ -8,7 +8,6 @@ import QtQuick.Layouts import org.kde.kirigami as Kirigami import org.kde.plasma.components 3.0 as PlasmaComponents -import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio import './delegate' @@ -90,21 +89,6 @@ Item { } } - // Close button for convergence mode - QQC2.ToolButton { - visible: ShellSettings.Settings.convergenceModeEnabled - icon.name: "window-close-symbolic" - icon.color: "white" - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - onClicked: folio.HomeScreenState.closeAppDrawer() - QQC2.ToolTip.text: i18n("Close") - QQC2.ToolTip.visible: hovered - QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay - - Kirigami.Theme.inherit: false - Kirigami.Theme.colorSet: Kirigami.Theme.Complementary - } } } diff --git a/containments/homescreens/folio/qml/main.qml b/containments/homescreens/folio/qml/main.qml index 14d8a755..0baf678e 100644 --- a/containments/homescreens/folio/qml/main.qml +++ b/containments/homescreens/folio/qml/main.qml @@ -400,10 +400,56 @@ ContainmentItem { id: powerSession } - // Power buttons stacked at top — icon only, tooltip on hover + // Close button anchored to top — smaller than power icons + Rectangle { + id: closeButton + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: Kirigami.Units.smallSpacing + height: Kirigami.Units.iconSizes.smallMedium + 2 * Kirigami.Units.smallSpacing + radius: Kirigami.Units.cornerRadius + color: closeArea.containsPress + ? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.2) + : closeArea.containsMouse + ? Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) + : "transparent" + Kirigami.Icon { + anchors.centerIn: parent + width: Kirigami.Units.iconSizes.smallMedium + height: width + source: "window-close-symbolic" + active: closeArea.containsMouse + } + PlasmaComponents.ToolTip { + text: i18n("Close") + visible: closeArea.containsMouse + } + MouseArea { + id: closeArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: folio.HomeScreenState.closeAppDrawer() + } + } + + // Separator below close button + Rectangle { + anchors.top: closeButton.bottom + anchors.topMargin: Kirigami.Units.smallSpacing + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: Kirigami.Units.smallSpacing + anchors.rightMargin: Kirigami.Units.smallSpacing + height: 1 + color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.15) + } + + // Power buttons centred vertically in the panel Column { id: powerColumn - anchors.top: parent.top + anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.right: parent.right anchors.margins: Kirigami.Units.smallSpacing