┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabwidget.h
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2020-09-20 18:53:59 +0200
committerElvis Angelaccio <[email protected]>2020-11-09 23:49:07 +0100
commit37327c9b0aae112c5890703cba1f0157043007e0 (patch)
tree5cda9876f310a258b95226bc0d9681acc665f98e /src/dolphintabwidget.h
parent6151a7aec0516570926cb1d15da48936e38e6765 (diff)
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
Diffstat (limited to 'src/dolphintabwidget.h')
-rw-r--r--src/dolphintabwidget.h14
1 files changed, 11 insertions, 3 deletions
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 <QTabWidget>
#include <QUrl>
-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<int, bool> indexByUrl(const QUrl& url) const;
private:
- int m_lastViewedTab;
+ QPointer<DolphinTabPage> m_lastViewedTab;
+ QPointer<DolphinNavigatorsWidgetAction> m_navigatorsWidget;
};
#endif