mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Merge branch 'go_to_bottom' of https://github.com/maltee1/nheko into maltee1-go_to_bottom
This commit is contained in:
commit
a3ae90415c
1 changed files with 58 additions and 0 deletions
|
@ -754,4 +754,62 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
RoundButton {
|
||||||
|
id: toEndButton
|
||||||
|
anchors {
|
||||||
|
bottom: parent.bottom
|
||||||
|
right: scrollbar.left
|
||||||
|
bottomMargin: Nheko.paddingMedium+(fullWidth-width)/2
|
||||||
|
rightMargin: Nheko.paddingMedium+(fullWidth-width)/2
|
||||||
|
}
|
||||||
|
property int fullWidth: 40
|
||||||
|
width: fullWidth
|
||||||
|
height: width
|
||||||
|
radius: width/2
|
||||||
|
onClicked: chat.positionViewAtBeginning();
|
||||||
|
flat: true
|
||||||
|
highlighted: true
|
||||||
|
|
||||||
|
states: State {
|
||||||
|
name: "hidden"
|
||||||
|
when: chat.atYEnd
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: buttonImg
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: Nheko.paddingMedium
|
||||||
|
source: ("image://colorimage/" + ":/icons/icons/ui/download.svg" + "?" + Nheko.colors.buttonText)
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
}
|
||||||
|
|
||||||
|
transitions: [
|
||||||
|
Transition {
|
||||||
|
from: ""
|
||||||
|
to: "hidden"
|
||||||
|
|
||||||
|
PropertyAnimation {
|
||||||
|
target: toEndButton
|
||||||
|
properties: "width"
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
from: 40
|
||||||
|
to: 0
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Transition {
|
||||||
|
from: "hidden"
|
||||||
|
to: ""
|
||||||
|
|
||||||
|
PropertyAnimation {
|
||||||
|
target: toEndButton
|
||||||
|
properties: "width"
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
from: 0
|
||||||
|
to: 40
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue