clean up
This commit is contained in:
+45
-22
@@ -1,22 +1,45 @@
|
||||
import QtQuick
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "transparent"
|
||||
|
||||
AnimatedImage {
|
||||
anchors.fill: parent
|
||||
source: "../Gifs/evernight.gif"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.MiddleButton
|
||||
onClicked: (mouse) => {
|
||||
if (mouse.button === Qt.MiddleButton) {
|
||||
toggleHelper.toggleLayer()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
anchors.fill: parent
|
||||
|
||||
AnimatedImage {
|
||||
anchors.fill: parent
|
||||
source: "../Gifs/evernight.gif"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
// margins {
|
||||
// mainWindow.left: 50
|
||||
// }
|
||||
|
||||
IpcHandler {
|
||||
target: "command"
|
||||
|
||||
// Keybind swap layer
|
||||
function toggleLayer(): void {
|
||||
if ( !mainWindow.onTop ) {
|
||||
mainWindow.WlrLayershell.layer = WlrLayer.Top
|
||||
mainWindow.onTop = true
|
||||
} else {
|
||||
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
||||
mainWindow.onTop = false
|
||||
}
|
||||
}
|
||||
|
||||
// Keybind swap overlay
|
||||
function toggleOverlay(): void {
|
||||
if (!mainWindow.onTop) {
|
||||
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
|
||||
mainWindow.onTop = true
|
||||
} else {
|
||||
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
||||
mainWindow.onTop = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user