mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 12:35:52 +03:00
Replace use of magic numbers for animation durations in copy share link button with constants defined in Style.qml
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
4e12bbf3e4
commit
191d8350c1
2 changed files with 7 additions and 3 deletions
|
@ -881,11 +881,11 @@ Page {
|
|||
onClicked: copyShareLink()
|
||||
|
||||
Behavior on bgColor {
|
||||
ColorAnimation { duration: 200 }
|
||||
ColorAnimation { duration: Style.shortAnimationDuration }
|
||||
}
|
||||
|
||||
Behavior on bgHoverOpacity {
|
||||
NumberAnimation { duration: 200 }
|
||||
NumberAnimation { duration: Style.shortAnimationDuration }
|
||||
}
|
||||
|
||||
TextEdit {
|
||||
|
@ -895,7 +895,7 @@ Page {
|
|||
|
||||
Timer {
|
||||
id: shareLinkCopyTimer
|
||||
interval: 3000
|
||||
interval: Style.veryLongAnimationDuration
|
||||
onTriggered: copyShareLinkButton.shareLinkCopied = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,6 +147,10 @@ QtObject {
|
|||
|
||||
readonly property int trayWindowMenuEntriesMargin: 6
|
||||
|
||||
// animation durations
|
||||
readonly property int shortAnimationDuration: 200
|
||||
readonly property int veryLongAnimationDuration: 3000
|
||||
|
||||
function variableSize(size) {
|
||||
return size * (1 + Math.min(pixelSize / 100, 1));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue