From 37327c9b0aae112c5890703cba1f0157043007e0 Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Sun, 20 Sep 2020 18:53:59 +0200 Subject: Make UrlNavigators in the toolbar the only option The UrlNavigators will be automatically added to the toolbar. The Sort By action is removed from the default toolbar to make space. Remove all options to have UrlNavigators outside the toolbar and remove those code paths. Make it so the new NavigatorsWidgetAction contains two UrlNavigators when in split view mode. Spacing was also added to align these UrlNavigators with the ViewContainers when enough space is available. Force the toolbar to be either at the top or bottom of the window. Set a sane sizeHint for DolphinUrlNavigator. It would be better to do this in KUrlNavigator in the future. This commit also contains a changes which should be moved to a separate merge requests before this gets merged: - Add an expansion animation when split view is enabled by the user --- src/dolphintabwidget.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/dolphintabwidget.h') diff --git a/src/dolphintabwidget.h b/src/dolphintabwidget.h index 9cc03f127..707eb086a 100644 --- a/src/dolphintabwidget.h +++ b/src/dolphintabwidget.h @@ -7,11 +7,13 @@ #ifndef DOLPHIN_TAB_WIDGET_H #define DOLPHIN_TAB_WIDGET_H +#include "dolphinnavigatorswidgetaction.h" + #include #include -class DolphinViewContainer; class DolphinTabPage; +class DolphinViewContainer; class KConfigGroup; class DolphinTabWidget : public QTabWidget @@ -32,7 +34,12 @@ public: */ AfterLastTab }; - explicit DolphinTabWidget(QWidget* parent); + + /** + * @param navigatorsWidget The navigatorsWidget which is always going to be connected + * to the active tabPage. + */ + explicit DolphinTabWidget(DolphinNavigatorsWidgetAction *navigatorsWidget, QWidget *parent); /** * @return Tab page at the current index (can be 0 if tabs count is smaller than 1) @@ -224,7 +231,8 @@ private: QPair indexByUrl(const QUrl& url) const; private: - int m_lastViewedTab; + QPointer m_lastViewedTab; + QPointer m_navigatorsWidget; }; #endif -- cgit v1.3