forked from Shinonome/dots-hyprland
waffles: overview: more proper anims and dragging functionality
ITS FUCKING WORKING AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user