forked from Shinonome/dots-hyprland
overview: animate search area
This commit is contained in:
@@ -17,7 +17,7 @@ Item { // Wrapper
|
|||||||
property string searchingText: ""
|
property string searchingText: ""
|
||||||
property bool showResults: searchingText != ""
|
property bool showResults: searchingText != ""
|
||||||
implicitWidth: searchWidgetContent.implicitWidth + Appearance.sizes.elevationMargin * 2
|
implicitWidth: searchWidgetContent.implicitWidth + Appearance.sizes.elevationMargin * 2
|
||||||
implicitHeight: searchWidgetContent.implicitHeight + Appearance.sizes.elevationMargin * 2
|
implicitHeight: searchBar.implicitHeight + searchBar.verticalPadding * 2 + Appearance.sizes.elevationMargin * 2
|
||||||
|
|
||||||
property string mathResult: ""
|
property string mathResult: ""
|
||||||
property bool clipboardWorkSafetyActive: {
|
property bool clipboardWorkSafetyActive: {
|
||||||
@@ -201,15 +201,29 @@ Item { // Wrapper
|
|||||||
}
|
}
|
||||||
Rectangle { // Background
|
Rectangle { // Background
|
||||||
id: searchWidgetContent
|
id: searchWidgetContent
|
||||||
anchors.centerIn: parent
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
topMargin: Appearance.sizes.elevationMargin
|
||||||
|
}
|
||||||
|
clip: true
|
||||||
implicitWidth: columnLayout.implicitWidth
|
implicitWidth: columnLayout.implicitWidth
|
||||||
implicitHeight: columnLayout.implicitHeight
|
implicitHeight: columnLayout.implicitHeight
|
||||||
radius: searchBar.height / 2 + searchBar.verticalPadding
|
radius: searchBar.height / 2 + searchBar.verticalPadding
|
||||||
color: Appearance.colors.colBackgroundSurfaceContainer
|
color: Appearance.colors.colBackgroundSurfaceContainer
|
||||||
|
|
||||||
|
Behavior on implicitHeight {
|
||||||
|
id: searchHeightBehavior
|
||||||
|
enabled: GlobalStates.overviewOpen && root.showResults
|
||||||
|
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: columnLayout
|
id: columnLayout
|
||||||
anchors.centerIn: parent
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
// clip: true
|
// clip: true
|
||||||
|
|||||||
Reference in New Issue
Block a user