Commit 0d9cd3c9 authored by Nate Graham's avatar Nate Graham
Browse files

applet: add visible button to close QR code overlay

We generally include such buttons in full-screen overlays so that it's
visually obvious how to close it, for people not familiar with the UX
concept of clicking on the thing itself or its darkened background.

CCBUG: 455950
parent ed48c4de
Pipeline #196786 passed with stage
in 4 minutes and 4 seconds
......@@ -8,6 +8,8 @@ import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.kirigami 2.3 as Kirigami
import org.kde.prison 1.0 as Prison
......@@ -43,5 +45,19 @@ Window {
barcodeType: "QRCode"
// Because some people like to have something visible to click on,
// and to them, it might not be obvious that you close the overlay
// by clicking anywhere on it.
PlasmaComponents3.Button {
anchors {
right: parent.right
margins: Kirigami.Units.largeSpacing
} "window-close"
onClicked: window.destroyWindow()
  • Nate Graham @ngraham

    mentioned in merge request !132 (closed)


    mentioned in merge request !132 (closed)

    Toggle commit list
  • I'd be very much in favor of standardizing this kind of fullscreen overlay window, and using it for some other scenarios. Telegram-desktop is the first one that comes on my mind. Thoughts?

  • Also, shouldn't the button respect the location (left/right side affinity) of "Close" button of a window decoration? OTOH margins are probably harmful for Fitts law.

  • Yeah, NeoChat has one too, and there are a few implementations in System Settings for big full-screen previews. +1 for standardizing in general.

    Of course we'll need two implementations, one for apps and one for Plasma

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment