diff options
| author | Felix Ernst <[email protected]> | 2021-01-02 17:48:52 +0000 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2021-01-02 17:48:52 +0000 |
| commit | f01a61b76c8588a4df2054ab70e9a746a74f7817 (patch) | |
| tree | 1bc359df5c5f2e203652f1e59e1c08544383488e /src/dolphinmainwindow.cpp | |
| parent | d3c5bb6e9b99c6ff43bd8160df58d35a725a0894 (diff) | |
Animate split view mode toggling
Have the secondary ViewContainer slide into/out of view when split view mode is switched on or off by the user.
This should help users understand what split view mode is about. Without the animation it might seem like the only thing the button does is creating a weird vertical line in the middle of the view or something. With the animation it should be clear that the second view is a separate entity that was added. The closing animation will help users understand which of the ViewContainers was just closed.
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 321670b58..3377918ce 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -807,7 +807,7 @@ void DolphinMainWindow::invertSelection() void DolphinMainWindow::toggleSplitView() { DolphinTabPage* tabPage = m_tabWidget->currentTabPage(); - tabPage->setSplitViewEnabled(!tabPage->splitViewEnabled()); + tabPage->setSplitViewEnabled(!tabPage->splitViewEnabled(), WithAnimation); updateViewActions(); } @@ -815,8 +815,8 @@ void DolphinMainWindow::toggleSplitView() void DolphinMainWindow::toggleSplitStash() { DolphinTabPage* tabPage = m_tabWidget->currentTabPage(); - tabPage->setSplitViewEnabled(false); - tabPage->setSplitViewEnabled(true, QUrl("stash:/")); + tabPage->setSplitViewEnabled(false, WithAnimation); + tabPage->setSplitViewEnabled(true, WithAnimation, QUrl("stash:/")); } void DolphinMainWindow::reloadView() @@ -2143,7 +2143,7 @@ void DolphinMainWindow::refreshViews() // The startup settings have been changed by the user (see bug #254947). // Synchronize the split-view setting with the active view: const bool splitView = GeneralSettings::splitView(); - m_tabWidget->currentTabPage()->setSplitViewEnabled(splitView); + m_tabWidget->currentTabPage()->setSplitViewEnabled(splitView, WithAnimation); updateSplitAction(); updateWindowTitle(); } |
