Skip to content

Commit 6595379

Browse files
Added documentation of new AutoHideCloseButtonCollapsesDock flag
1 parent 0cac9ac commit 6595379

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

demo/MainWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ CMainWindow::CMainWindow(QWidget *parent) :
734734
CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true);
735735

736736
// uncomment if you would like to enable dock widget auto hiding
737-
CDockManager::setAutoHideConfigFlags(CDockManager::DefaultAutoHideConfig);
737+
CDockManager::setAutoHideConfigFlags({CDockManager::DefaultAutoHideConfig | CDockManager::AutoHideCloseButtonCollapsesDock});
738738

739739
// uncomment if you would like to enable an equal distribution of the
740740
// available size of a splitter to all contained dock widgets
Loading
Loading

doc/user-guide.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
- [`AutoHideButtonCheckable`](#autohidebuttoncheckable)
4040
- [`AutoHideSideBarsIconOnly`](#autohidesidebarsicononly)
4141
- [`AutoHideShowOnMouseOver`](#autohideshowonmouseover)
42+
- [`AutoHideCloseButtonCollapsesDock`](#autohideclosebuttoncollapsesdock)
4243
- [DockWidget Feature Flags](#dockwidget-feature-flags)
4344
- [`DockWidgetClosable`](#dockwidgetclosable)
4445
- [`DockWidgetMovable`](#dockwidgetmovable)
@@ -589,6 +590,21 @@ is shown, if the user hovers over the Auto-Hide tab or if the users moves the
589590
mouse outside of the Auto-Hide widget. Showing and hiding my mouse click still
590591
works if this feature is enabled.
591592
593+
### `AutoHideCloseButtonCollapsesDock`
594+
595+
Some users don't understand the distinction between closing an auto hide dock and
596+
collapsing an auto hide dock. This may lead to situations where they press the
597+
close button (losing the side tab widget) instead of simply clicking outside
598+
the auto hide dock (collapsing the dock).
599+
600+
![AutoHideCloseButtonCollapsesDock false](cfg_flag_AutoHideCloseButtonCollapsesDock_false.gif)
601+
602+
If `AutoHideCloseButtonCollapsesDock` option is active, the
603+
close button in an auto hide widget collapses the auto hide widget instead of
604+
closing it.
605+
606+
![AutoHideCloseButtonCollapsesDock true](cfg_flag_AutoHideCloseButtonCollapsesDock_true.gif)
607+
592608
## DockWidget Feature Flags
593609
594610
### `DockWidgetClosable`

src/DockManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public Q_SLOTS:
245245
AutoHideButtonCheckable = 0x08, //!< If the flag is set, the auto hide button will be checked and unchecked depending on the auto hide state. Mainly for styling purposes.
246246
AutoHideSideBarsIconOnly = 0x10,///< show only icons in auto hide side tab - if a tab has no icon, then the text will be shown
247247
AutoHideShowOnMouseOver = 0x20, ///< show the auto hide window on mouse over tab and hide it if mouse leaves auto hide container
248-
AutoHideCloseButtonCollapsesDock = 0x40, ///< Close button of an auto hide container closes the dock instead of hiding it completely
248+
AutoHideCloseButtonCollapsesDock = 0x40, ///< Close button of an auto hide container collapses the dock instead of hiding it completely
249249

250250
DefaultAutoHideConfig = AutoHideFeatureEnabled
251251
| DockAreaHasAutoHideButton ///< the default configuration for left and right side bars

0 commit comments

Comments
 (0)