kwin/examples/quick-effect/package/contents/ui/main.qml
Vlad Zahorodnii 3eb64535d8 examples/quick-effect: Change license of main.qml
Apparently CC0 is not okay with KDE's licensing policies.
2023-10-18 19:39:14 +03:00

45 lines
986 B
QML

/*
SPDX-FileCopyrightText: 2023 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: MIT
*/
import QtQuick
import org.kde.kwin
SceneEffect {
id: effect
delegate: Rectangle {
color: effect.configuration.BackgroundColor
Text {
anchors.centerIn: parent
text: SceneView.screen.name
}
MouseArea {
anchors.fill: parent
onClicked: effect.visible = false
}
}
ScreenEdgeHandler {
enabled: true
edge: ScreenEdgeHandler.TopEdge
onActivated: effect.visible = !effect.visible
}
ShortcutHandler {
name: "Toggle Quick Effect"
text: "Toggle Quick Effect"
sequence: "Meta+Ctrl+Q"
onActivated: effect.visible = !effect.visible
}
PinchGestureHandler {
direction: PinchGestureHandler.Direction.Contracting
fingerCount: 3
onActivated: effect.visible = !effect.visible
}
}