Vertical tabs (#1815)

* Vertical tabs

* Vertical tab wrapping

* Fix formatting

* Cleanup code

* Updated changelog

* Hide button row if no buttons exist

* Fix tab width expansion

Co-authored-by: fourtf <tf.four@gmail.com>
This commit is contained in:
Daniel
2020-08-13 09:43:08 -04:00
committed by GitHub
parent b52d15b9b4
commit 0e6ca6b097
10 changed files with 278 additions and 77 deletions
+6 -1
View File
@@ -16,6 +16,8 @@ class NotebookButton;
class NotebookTab;
class SplitContainer;
enum NotebookTabDirection { Horizontal = 0, Vertical = 1 };
class Notebook : public BaseWidget
{
Q_OBJECT
@@ -52,6 +54,8 @@ public:
void performLayout(bool animate = false);
void setTabDirection(NotebookTabDirection direction);
protected:
virtual void scaleChangedEvent(float scale_) override;
virtual void resizeEvent(QResizeEvent *) override;
@@ -81,7 +85,8 @@ private:
bool allowUserTabManagement_ = false;
bool showAddButton_ = false;
int lineY_ = 20;
int lineOffset_ = 20;
NotebookTabDirection tabDirection_ = NotebookTabDirection::Horizontal;
};
class SplitNotebook : public Notebook, pajlada::Signals::SignalHolder