mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +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()
|
onClicked: copyShareLink()
|
||||||
|
|
||||||
Behavior on bgColor {
|
Behavior on bgColor {
|
||||||
ColorAnimation { duration: 200 }
|
ColorAnimation { duration: Style.shortAnimationDuration }
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on bgHoverOpacity {
|
Behavior on bgHoverOpacity {
|
||||||
NumberAnimation { duration: 200 }
|
NumberAnimation { duration: Style.shortAnimationDuration }
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
|
@ -895,7 +895,7 @@ Page {
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: shareLinkCopyTimer
|
id: shareLinkCopyTimer
|
||||||
interval: 3000
|
interval: Style.veryLongAnimationDuration
|
||||||
onTriggered: copyShareLinkButton.shareLinkCopied = false
|
onTriggered: copyShareLinkButton.shareLinkCopied = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,6 +147,10 @@ QtObject {
|
||||||
|
|
||||||
readonly property int trayWindowMenuEntriesMargin: 6
|
readonly property int trayWindowMenuEntriesMargin: 6
|
||||||
|
|
||||||
|
// animation durations
|
||||||
|
readonly property int shortAnimationDuration: 200
|
||||||
|
readonly property int veryLongAnimationDuration: 3000
|
||||||
|
|
||||||
function variableSize(size) {
|
function variableSize(size) {
|
||||||
return size * (1 + Math.min(pixelSize / 100, 1));
|
return size * (1 + Math.min(pixelSize / 100, 1));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue