Perfection ~Zach
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
pragma ComponentBehavior: Bound
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
@@ -5,11 +6,19 @@ import Quickshell.Wayland
|
|||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: mainWindow
|
id: mainWindow
|
||||||
WlrLayershell.layer: WlrLayer.Bottom
|
WlrLayershell.layer: WlrLayer.Top
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
anchors {
|
||||||
|
bottom: true
|
||||||
|
left: true
|
||||||
|
}
|
||||||
surfaceFormat.opaque: false
|
surfaceFormat.opaque: false
|
||||||
implicitWidth: screen.width
|
implicitWidth: 320
|
||||||
implicitHeight: screen.height
|
implicitHeight: 293
|
||||||
|
margins {
|
||||||
|
left: 0
|
||||||
|
bottom: 5
|
||||||
|
}
|
||||||
|
|
||||||
property bool onTop: true
|
property bool onTop: true
|
||||||
|
|
||||||
@@ -23,39 +32,23 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ListModel {
|
Rectangle {
|
||||||
id: petModels
|
anchors.fill: parent
|
||||||
ListElement {
|
color: "transparent"
|
||||||
width: 320;
|
|
||||||
height: 293;
|
id: petContainer
|
||||||
x: 0;
|
AnimatedImage {
|
||||||
y: 1124;
|
anchors.fill: parent
|
||||||
source: "./Gifs/evernight.gif"
|
source: "Gifs/evernight.gif"
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Repeater {
|
MouseArea {
|
||||||
model: petModels
|
anchors.fill: parent
|
||||||
delegate: Item {
|
acceptedButtons: Qt.MiddleButton
|
||||||
width: model.width
|
onClicked: (mouse) => {
|
||||||
height: model.height
|
if (mouse.button === Qt.MiddleButton) {
|
||||||
x: model.x
|
mainWindow.toggleLayer()
|
||||||
y: model.y
|
|
||||||
|
|
||||||
AnimatedImage {
|
|
||||||
anchors.fill: parent
|
|
||||||
source: model.source
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
drag.target: parent
|
|
||||||
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
|
|
||||||
onClicked: (mouse) => {
|
|
||||||
if (mouse.button === Qt.MiddleButton) {
|
|
||||||
mainWindow.toggleLayer()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user