diff --git a/doc/cfg_flag_DockAreaHideDisabledButtons_false.png b/doc/cfg_flag_DockAreaHideDisabledButtons_false.png new file mode 100644 index 0000000..e983108 Binary files /dev/null and b/doc/cfg_flag_DockAreaHideDisabledButtons_false.png differ diff --git a/doc/cfg_flag_DockAreaHideDisabledButtons_true.png b/doc/cfg_flag_DockAreaHideDisabledButtons_true.png new file mode 100644 index 0000000..869e004 Binary files /dev/null and b/doc/cfg_flag_DockAreaHideDisabledButtons_true.png differ diff --git a/doc/user-guide.md b/doc/user-guide.md index d024e0f..0f96f37 100644 --- a/doc/user-guide.md +++ b/doc/user-guide.md @@ -18,6 +18,7 @@ - [`AlwaysShowTabs`](#alwaysshowtabs) - [`DockAreaHasUndockButton`](#dockareahasundockbutton) - [`DockAreaHasTabsMenuButton`](#dockareahastabsmenubutton) + - [`DockAreaHideDisabledButtons`](#dockareahidedisabledbuttons) ## Configuration Flags @@ -227,3 +228,17 @@ in the dock area title bar. On the left side, the tabs menu button flag is cleared. ![DockAreaHasTabsMenuButton false true](cfg_flag_DockAreaHasTabsMenuButton_false_true.png) + +### `DockAreaHideDisabledButtons` + +If certain flags of a dock widget are disabled, like `DockWidgetClosable` or +`DockWidgetFloatable`, then the corresponding dock area buttons like close +button or detach button are disabled (greyed out). This is the default +setting. + +![DockAreaHideDisabledButtons false](cfg_flag_DockAreaHideDisabledButtons_false.png) + +If the flag is set, disabled dock area buttons will not appear on the toolbar at +all - they are hidden. + +![DockAreaHideDisabledButtons true](cfg_flag_DockAreaHideDisabledButtons_true.png) diff --git a/src/DockManager.h b/src/DockManager.h index 7a9821d..27feb68 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -155,7 +155,7 @@ public: AlwaysShowTabs = 0x2000,///< If this option is enabled, the tab of a dock widget is always displayed - even if it is the only visible dock widget in a floating widget. DockAreaHasUndockButton = 0x4000, //!< If the flag is set each dock area has an undock button DockAreaHasTabsMenuButton = 0x8000, //!< If the flag is set each dock area has a tabs menu button - DockAreaHideDisabledButtons = 0x10000, //!< If the flag is set disabled dock area buttons will not appear on the tollbar at all (enabling them will bring them back) + DockAreaHideDisabledButtons = 0x10000, //!< If the flag is set disabled dock area buttons will not appear on the toolbar at all (enabling them will bring them back) DockAreaDynamicTabsMenuButtonVisibility = 0x20000, //!< If the flag is set dock area will disable a tabs menu button when there is only one tab in the area FloatingContainerHasWidgetTitle = 0x40000, //!< If set, the Floating Widget window title reflects the title of the current dock widget otherwise it displays application name as window title FloatingContainerHasWidgetIcon = 0x80000, //!< If set, the Floating Widget icon reflects the icon of the current dock widget otherwise it displays application icon diff --git a/src/DockWidget.h b/src/DockWidget.h index 7985ae8..d66d769 100644 --- a/src/DockWidget.h +++ b/src/DockWidget.h @@ -147,8 +147,8 @@ public: enum DockWidgetFeature { - DockWidgetClosable = 0x01, - DockWidgetMovable = 0x02,///< this feature is not properly implemented yet and is ignored + DockWidgetClosable = 0x01,///< dock widget has a close button + DockWidgetMovable = 0x02,///< dock widget is movable and can be moved to a new position in the current dock container DockWidgetFloatable = 0x04, DockWidgetDeleteOnClose = 0x08, ///< deletes the dock widget when it is closed CustomCloseHandling = 0x10,