diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-18 06:57:18 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-18 15:01:13 +0300 |
commit | 88e1a4667d981bf7d87f1e4052a7671a960351da (patch) | |
tree | b9807b832fc328a16b874c521fa4d657fadc1ab6 /src/ui/sidebarwidget.c | |
parent | 54882a015e4ea880fb817f013609a3f8411db725 (diff) |
SidebarWidget: Don't animate at launch
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r-- | src/ui/sidebarwidget.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 436eb250..cb6dab65 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -878,7 +878,8 @@ static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char * | |||
878 | if (arg_Command(cmd) && isVisible_Widget(w)) { | 878 | if (arg_Command(cmd) && isVisible_Widget(w)) { |
879 | return iTrue; | 879 | return iTrue; |
880 | } | 880 | } |
881 | const iBool isAnimated = (deviceType_App() != phone_AppDeviceType); | 881 | const iBool isAnimated = argLabel_Command(cmd, "noanim") == 0 && |
882 | (deviceType_App() != phone_AppDeviceType); | ||
882 | int visX = 0; | 883 | int visX = 0; |
883 | if (isVisible_Widget(w)) { | 884 | if (isVisible_Widget(w)) { |
884 | visX = left_Rect(bounds_Widget(w)) - left_Rect(w->root->widget->rect); | 885 | visX = left_Rect(bounds_Widget(w)) - left_Rect(w->root->widget->rect); |
@@ -895,6 +896,7 @@ static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char * | |||
895 | } | 896 | } |
896 | } | 897 | } |
897 | else if (isAnimated) { | 898 | else if (isAnimated) { |
899 | setFlags_Widget(w, horizontalOffset_WidgetFlag, iTrue); | ||
898 | if (d->side == right_SideBarSide) { | 900 | if (d->side == right_SideBarSide) { |
899 | setVisualOffset_Widget(w, visX, 0, 0); | 901 | setVisualOffset_Widget(w, visX, 0, 0); |
900 | setVisualOffset_Widget(w, visX + w->rect.size.x, 300, easeOut_AnimFlag | softer_AnimFlag); | 902 | setVisualOffset_Widget(w, visX + w->rect.size.x, 300, easeOut_AnimFlag | softer_AnimFlag); |