waffles: overview: more proper anims and dragging functionality

ITS FUCKING WORKING AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
This commit is contained in:
end-4
2025-12-14 23:40:32 +01:00
parent f1fdb941e1
commit 663eb1896a
5 changed files with 168 additions and 43 deletions
@@ -16,6 +16,7 @@ WMouseAreaButton {
required property int workspace
property bool newWorkspace: false
property bool droppable: false
readonly property bool isActiveWorkspace: HyprlandData.activeWorkspace?.id === root.workspace
readonly property real screenWidth: QsWindow.window?.width ?? 0
@@ -28,12 +29,7 @@ WMouseAreaButton {
height: ListView.view?.height ?? 100
implicitWidth: 244 // for now
onClicked: {
GlobalStates.overviewOpen = false;
Hyprland.dispatch(`workspace ${root.workspace}`);
}
colBackground: ColorUtils.transparentize(Looks.colors.bg2, isActiveWorkspace ? 0 : 1)
colBackground: ColorUtils.transparentize(Looks.colors.bg2, (isActiveWorkspace || droppable) ? 0 : 1)
Behavior on color {
animation: Looks.transition.color.createObject(this)
}
@@ -119,6 +115,14 @@ WMouseAreaButton {
icon: "add"
}
}
Rectangle {
z: 2
visible: root.droppable && !root.newWorkspace
anchors.fill: parent
color: Looks.colors.accent
opacity: 0.2
}
}
}