Skip to content

Commit

Permalink
Fix review comments.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander committed Sep 20, 2023
1 parent 632f455 commit 4869527
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gui/tray/ActivityList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ ScrollView {

Timer {
id: repeatUpFlickTimer
interval: 50
interval: Style.activityListScrollToTopTimerInterval
running: controlRoot.scrollingToTop
repeat: true
onTriggered: {
if (!activityList.atYBeginning) {
activityList.flick(0, 10000)
activityList.flick(0, Style.activityListScrollToTopVelocity)
} else {
controlRoot.scrollingToTop = false
}
Expand Down
4 changes: 2 additions & 2 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ ApplicationWindow {

Timer {
id: newActivitiesButtonDisappearTimer
interval: 5000
interval: Style.newActivityButtonDisappearTimeout
running: newActivitiesButtonLoader.active && !newActivitiesButton.hovered
repeat: false
onTriggered: fadeoutActivitiesButtonDisappear.running = true
Expand All @@ -904,7 +904,7 @@ ApplicationWindow {
target: newActivitiesButton;
from: 1;
to: 0;
duration: 250
duration: Style.newActivityButtonDisappearFadeTimeout
loops: 1
running: false
onFinished: newActivitiesButtonLoader.active = false
Expand Down
7 changes: 7 additions & 0 deletions theme/Style/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ QtObject {
property real newActivitiesBgNormalOpacity: 0.8
property real newActivitiesBgHoverOpacity: 1.0

property int newActivityButtonDisappearTimeout: 5000
property int newActivityButtonDisappearFadeTimeout: 250

property int activityListScrollToTopTimerInterval: 50

property int activityListScrollToTopVelocity: 10000

function variableSize(size) {
return size * (1 + Math.min(pixelSize / 100, 1));
}
Expand Down

0 comments on commit 4869527

Please sign in to comment.