Remove slide animation from mcsr thin macro

This commit is contained in:
2026-09-08 01:14:21 -07:00
parent 209bcdbd66
commit 69cc62cb55
5 changed files with 16 additions and 35 deletions
-1
View File
@@ -63,7 +63,6 @@ Item {
break; break;
case Qt.Key_Backspace: case Qt.Key_Backspace:
// If control is held when backspace is pressed // If control is held when backspace is pressed
console.log((event.modifiers & 0x4000000).toString(16))
if (event.modifiers & 0x4000000) { if (event.modifiers & 0x4000000) {
input.text = "" input.text = ""
} }
+9 -6
View File
@@ -10,7 +10,7 @@ Grid {
top: parent.top top: parent.top
horizontalCenter: parent.horiontalCenter horizontalCenter: parent.horiontalCenter
} }
spacing: 6 spacing: 4
padding: 6 padding: 6
columns: 5 columns: 5
horizontalItemAlignment: Grid.AlignHCenter horizontalItemAlignment: Grid.AlignHCenter
@@ -20,13 +20,15 @@ Grid {
Hyprland.refreshToplevels() Hyprland.refreshToplevels()
} }
component WorkspaceView: ClippingRectangle { component WorkspaceView: ClippingRectangle {
id: workspaceView
color: "#282828" color: "#282828"
width: 192 width: 192
radius: 8 radius: 8
topLeftRadius: modelData == 0 ? 12 : this.radius topLeftRadius: modelData == 0 ? 12 : this.radius
topRightRadius: modelData == 4 ? 12 : this.radius topRightRadius: modelData == 4 ? 12 : this.radius
bottomLeftRadius: modelData == 5 ? 12 : this.radius bottomLeftRadius: modelData == 5 ? 12 : this.radius
height: this.width * Hyprland.focusedMonitor?.height / Hyprland.focusedMonitor?.width property var widthRatio: this.width / Hyprland.focusedMonitor?.width
height: Hyprland.focusedMonitor?.height * widthRatio
border { border {
width: 2 width: 2
color: { color: {
@@ -42,6 +44,7 @@ Grid {
Behavior on color { ColorAnimation {duration: 150} } Behavior on color { ColorAnimation {duration: 150} }
} }
required property var modelData required property var modelData
Image { Image {
anchors.fill: parent anchors.fill: parent
source: Quickshell.shellPath('assets/wallpaper') source: Quickshell.shellPath('assets/wallpaper')
@@ -50,10 +53,10 @@ Grid {
Repeater { Repeater {
model: Hyprland.toplevels.values.filter(tl => tl.workspace?.id == modelData + 1) model: Hyprland.toplevels.values.filter(tl => tl.workspace?.id == modelData + 1)
delegate: ClippingRectangle { delegate: ClippingRectangle {
x: modelData.lastIpcObject.at[0] / 10 - 2 x: modelData.lastIpcObject.at[0] * workspaceView.widthRatio - 2
y: modelData.lastIpcObject.at[1] / 10 - 2 y: modelData.lastIpcObject.at[1] * workspaceView.widthRatio - 2
width: modelData.lastIpcObject.size[0] / 10 width: modelData.lastIpcObject.size[0] * workspaceView.widthRatio
height: modelData.lastIpcObject.size[1] / 10 height: modelData.lastIpcObject.size[1] * workspaceView.widthRatio
ScreencopyView { ScreencopyView {
anchors.fill: parent anchors.fill: parent
captureSource: modelData.wayland captureSource: modelData.wayland
+6 -27
View File
@@ -9,33 +9,10 @@ import QtQuick.Effects
Item { Item {
id: thin id: thin
property bool open: false property bool open: false
property real pos: 0
PropertyAnimation on pos {
id: entry
running: false
to: 1
duration: 400
easing.type: Easing.OutQuint
}
PropertyAnimation on pos {
id: exit
running: false
to: 0
duration: 350
easing.type: Easing.OutQuint
onFinished: thin.open = false
}
IpcHandler { IpcHandler {
target: "thin" target: "thin"
function open() { function open() { thin.open = true }
thin.open = true function close() { thin.open = false }
exit.stop()
entry.start()
}
function close() {
entry.stop()
exit.start()
}
} }
PanelWindow { PanelWindow {
visible: thin.open visible: thin.open
@@ -47,6 +24,7 @@ Item {
implicitWidth: 1080 implicitWidth: 1080
color: "transparent" color: "transparent"
WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: 'mcsr-thin'
RectangularShadow { RectangularShadow {
anchors.fill: pie_wrapper anchors.fill: pie_wrapper
@@ -60,7 +38,7 @@ Item {
left: parent.left left: parent.left
top: parent.top top: parent.top
margins: 12 margins: 12
leftMargin: 1080 * (1 - thin.pos) + 12 leftMargin: 12
} }
width: 210 width: 210
height: 210 height: 210
@@ -96,6 +74,7 @@ Item {
implicitHeight: 120 implicitHeight: 120
color: "transparent" color: "transparent"
WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: 'mcsr-thin'
RectangularShadow { RectangularShadow {
anchors.fill: e_wrapper anchors.fill: e_wrapper
radius: e_wrapper.radius radius: e_wrapper.radius
@@ -108,7 +87,7 @@ Item {
right: parent.right right: parent.right
bottom: parent.bottom bottom: parent.bottom
margins: 12 margins: 12
rightMargin: 1080 * (1 - thin.pos) + 12 rightMargin: 12
} }
width: 240 width: 240
height: 48 height: 48
+1 -1
View File
@@ -11,7 +11,7 @@ layout(binding = 1) uniform sampler2D source;
void main() { void main() {
vec4 p = texture(source, qt_TexCoord0); vec4 p = texture(source, qt_TexCoord0);
if ( if (
key_enabled && // key_enabled &&
p.r == bgcol.r && p.r == bgcol.r &&
p.g == bgcol.g && p.g == bgcol.g &&
p.b == bgcol.b p.b == bgcol.b
BIN
View File
Binary file not shown.