]> cloud.milkyroute.net Git - dolphin.git/commit
Animate most of the bars
authorFelix Ernst <felixernst@kde.org>
Wed, 13 Mar 2024 15:39:00 +0000 (15:39 +0000)
committerFelix Ernst <felixernst@kde.org>
Wed, 13 Mar 2024 15:39:00 +0000 (15:39 +0000)
commitf588a7d48b7cef5351d8b0f030a6ec5e76229976
tree086c0743d3dd63e5ca11cd84e55b527f58cbe5ea
parent73ea5fd8450cdd097a47ede9d740cbbcf9f9df10
Animate most of the bars

When a bar is toggled visible this usually happens because the
user might want to use its functionality now. However, if bars
appear without animation or at a location the user is not
currently looking at, they might not notice that they have appeared
at all.

An animation makes it more likely that the user notices the change
and can then use the newly made visible component.

Another reason for animations for showing or hiding of components
is that it can be disorienting for users when panels or bars
suddenly appear or disappear without animation. There is no visible
movement then, so the user might not know what happened if they
didn't concentrate or blink at that moment. The newly appearing or
disappearing component might also displace other components which
can make it difficult to find what one was just looking at.

These bars animate now after this change:
- Search panel
- Filter bar
- Status bar

This is implemented by extracting the animation code from
SelectionMode::TopBar into a new abstract base class
AnimatedHeightWidget. This class is now also used in
SelectionMode::BottomBar and the animating code there was removed.

These bars are left in Dolphin that stay without animation:
- Menu bar (Would probably need to be implemented in KXmlGui)
- Tool bar (Would probably need to be implemented in KXmlGui)
- Tab bar (Needs a different appraoch because it already inherits
QTabBar and therefore can not inherit AnimatedHeightWidget)
16 files changed:
src/CMakeLists.txt
src/animatedheightwidget.cpp [new file with mode: 0644]
src/animatedheightwidget.h [new file with mode: 0644]
src/dolphinviewcontainer.cpp
src/dolphinviewcontainer.h
src/filterbar/filterbar.cpp
src/filterbar/filterbar.h
src/search/dolphinsearchbox.cpp
src/search/dolphinsearchbox.h
src/selectionmode/bottombar.cpp
src/selectionmode/bottombar.h
src/selectionmode/topbar.cpp
src/selectionmode/topbar.h
src/statusbar/dolphinstatusbar.cpp
src/statusbar/dolphinstatusbar.h
src/tests/dolphinsearchboxtest.cpp