From 516465aefb351fd1a6a9f2dabc0f469bb6fa0834 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 15 May 2020 12:25:22 +0200 Subject: [PATCH 1/5] Fixed issue #173 - tab changes position when redocking it to the same position --- src/DockContainerWidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DockContainerWidget.cpp b/src/DockContainerWidget.cpp index 91035dd..b964a24 100644 --- a/src/DockContainerWidget.cpp +++ b/src/DockContainerWidget.cpp @@ -575,6 +575,11 @@ void DockContainerWidgetPrivate::moveIntoCenterOfSection(QWidget* Widget, CDockA if (DroppedDockWidget) { CDockAreaWidget* OldDockArea = DroppedDockWidget->dockAreaWidget(); + if (OldDockArea == TargetArea) + { + return; + } + if (OldDockArea) { OldDockArea->removeDockWidget(DroppedDockWidget); From 40374178c9e0f5e9b461cd0c87ffaeb9ee4b7412 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 15 May 2020 12:40:49 +0200 Subject: [PATCH 2/5] Added Style documentation section to user-guide.md --- doc/user-guide.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/user-guide.md b/doc/user-guide.md index e000a55..94d0ab3 100644 --- a/doc/user-guide.md +++ b/doc/user-guide.md @@ -23,6 +23,8 @@ - [`FloatingContainerHasWidgetTitle`](#floatingcontainerhaswidgettitle) - [`FloatingContainerHasWidgetIcon`](#floatingcontainerhaswidgeticon) - [`HideSingleCentralWidgetTitleBar`](#hidesinglecentralwidgettitlebar) +- [Styling](#styling) + - [Disabling the Internal Style Sheet](#disabling-the-internal-style-sheet) ## Configuration Flags @@ -297,3 +299,19 @@ still has a titlebar to drag it out of the main window. ![HideSingleCentralWidgetTitleBar false](cfg_flag_HideSingleCentralWidgetTitleBar_false.png) +## Styling + +The Advanced Docking System supports styling via [Qt Style Sheets](https://doc.qt.io/qt-5/stylesheet.html). All components like like splitters, tabs, buttons, titlebar and +icons are styleable this way. + +### Disabling the Internal Style Sheet + +The dock manager uses an internal stylesheet to style its components. That +means, the style that you see in the demo application comes from the +internal stylesheets that you will find in `src/stylesheets` folder. If you want +to disable this internal stylesheet because your application uses its own, +just call the function for settings the stylesheet with an empty string. + +```c++ +DockManager->setStyleSheet(""); +``` From b3307d81ca7cba377d28b5086dd7cef76c7fcd29 Mon Sep 17 00:00:00 2001 From: githubuser0xFFFF Date: Fri, 15 May 2020 12:41:58 +0200 Subject: [PATCH 3/5] Update user-guide.md Fixed typo --- doc/user-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user-guide.md b/doc/user-guide.md index 94d0ab3..bc23be1 100644 --- a/doc/user-guide.md +++ b/doc/user-guide.md @@ -301,7 +301,7 @@ still has a titlebar to drag it out of the main window. ## Styling -The Advanced Docking System supports styling via [Qt Style Sheets](https://doc.qt.io/qt-5/stylesheet.html). All components like like splitters, tabs, buttons, titlebar and +The Advanced Docking System supports styling via [Qt Style Sheets](https://doc.qt.io/qt-5/stylesheet.html). All components like splitters, tabs, buttons, titlebar and icons are styleable this way. ### Disabling the Internal Style Sheet From cdb8926673e9c1e14c5a0bc3771ce0f49deabe73 Mon Sep 17 00:00:00 2001 From: Patrick Stewart Date: Fri, 15 May 2020 18:48:19 +0100 Subject: [PATCH 4/5] Add missing override (#176) --- src/DockAreaTitleBar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DockAreaTitleBar.h b/src/DockAreaTitleBar.h index 426e07a..279f779 100644 --- a/src/DockAreaTitleBar.h +++ b/src/DockAreaTitleBar.h @@ -86,7 +86,7 @@ protected: /** * Show context menu */ - virtual void contextMenuEvent(QContextMenuEvent *event); + virtual void contextMenuEvent(QContextMenuEvent *event) override; public slots: /** From eee9ebb41d0df029d09f3663d865cb60ea9c7fe8 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Sun, 17 May 2020 12:21:52 +0200 Subject: [PATCH 5/5] Fixed an issue that caused wrong inserten order of dock widget when dropping a floating widget to the left or top container drop area --- src/DockContainerWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DockContainerWidget.cpp b/src/DockContainerWidget.cpp index b964a24..1852b7d 100644 --- a/src/DockContainerWidget.cpp +++ b/src/DockContainerWidget.cpp @@ -415,9 +415,10 @@ void DockContainerWidgetPrivate::dropIntoContainer(CFloatingDockContainer* Float } else if (FloatingSplitter->orientation() == InsertParam.orientation()) { + int InsertIndex = InsertParam.append() ? Splitter->count() : 0; while (FloatingSplitter->count()) { - insertWidgetIntoSplitter(Splitter, FloatingSplitter->widget(0), InsertParam.append()); + Splitter->insertWidget(InsertIndex++, FloatingSplitter->widget(0)); } } else