mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
lock: animate left pill appearance too
This commit is contained in:
parent
f199bc4256
commit
4dcc1f340f
1 changed files with 24 additions and 22 deletions
|
|
@ -1,12 +1,10 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Qt5Compat.GraphicalEffects
|
|
||||||
import qs
|
import qs
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
import qs.modules.common.widgets
|
||||||
import qs.modules.common.functions
|
import qs.modules.common.functions
|
||||||
import qs.modules.bar as Bar
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -18,10 +16,6 @@ MouseArea {
|
||||||
passwordBox.forceActiveFocus();
|
passwordBox.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
forceFieldFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: context
|
target: context
|
||||||
function onShouldReFocus() {
|
function onShouldReFocus() {
|
||||||
|
|
@ -29,6 +23,25 @@ MouseArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property real toolbarScale: 0.9
|
||||||
|
property real toolbarOpacity: 0
|
||||||
|
Behavior on toolbarScale {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: Appearance.animation.elementMove.duration
|
||||||
|
easing.type: Appearance.animation.elementMove.type
|
||||||
|
easing.bezierCurve: Appearance.animationCurves.expressiveFastSpatial
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Behavior on toolbarOpacity {
|
||||||
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
forceFieldFocus();
|
||||||
|
toolbarScale = 1;
|
||||||
|
toolbarOpacity = 1;
|
||||||
|
}
|
||||||
|
|
||||||
Keys.onPressed: event => { // Esc to clear
|
Keys.onPressed: event => { // Esc to clear
|
||||||
if (event.key === Qt.Key_Escape) {
|
if (event.key === Qt.Key_Escape) {
|
||||||
root.context.currentText = "";
|
root.context.currentText = "";
|
||||||
|
|
@ -74,22 +87,8 @@ MouseArea {
|
||||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
scale: 0.9
|
scale: root.toolbarScale
|
||||||
opacity: 0
|
opacity: root.toolbarOpacity
|
||||||
Component.onCompleted: {
|
|
||||||
scale = 1;
|
|
||||||
opacity = 1;
|
|
||||||
}
|
|
||||||
Behavior on scale {
|
|
||||||
NumberAnimation {
|
|
||||||
duration: Appearance.animation.elementMove.duration
|
|
||||||
easing.type: Appearance.animation.elementMove.type
|
|
||||||
easing.bezierCurve: Appearance.animationCurves.expressiveFastSpatial
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Behavior on opacity {
|
|
||||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolbarTextField {
|
ToolbarTextField {
|
||||||
id: passwordBox
|
id: passwordBox
|
||||||
|
|
@ -143,6 +142,9 @@ MouseArea {
|
||||||
rightMargin: 20
|
rightMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scale: root.toolbarScale
|
||||||
|
opacity: root.toolbarOpacity
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
id: powerButton
|
id: powerButton
|
||||||
implicitWidth: height
|
implicitWidth: height
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue