mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 23:51:33 +08:00
Fix central dock widget being pinnable
- Add config for dock widget being pinnable
This commit is contained in:
parent
8ddabc4cc8
commit
19192541f9
@ -487,9 +487,12 @@ void CDockAreaTitleBar::onCurrentTabChanged(int Index)
|
||||
|
||||
//============================================================================
|
||||
void CDockAreaTitleBar::onAutoHideButtonClicked(bool Checked)
|
||||
{
|
||||
if (d->DockArea->features().testFlag(CDockWidget::DockWidgetPinnable))
|
||||
{
|
||||
d->DockArea->toggleAutoHideArea(Checked);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
@ -363,6 +363,8 @@ void DockAreaWidgetPrivate::updateTitleBarButtonStates()
|
||||
_this->features().testFlag(CDockWidget::DockWidgetClosable));
|
||||
TitleBar->button(TitleBarButtonUndock)->setEnabled(
|
||||
_this->features().testFlag(CDockWidget::DockWidgetFloatable));
|
||||
TitleBar->button(TitleBarButtonAutoHide)->setEnabled(
|
||||
_this->features().testFlag(CDockWidget::DockWidgetPinnable));
|
||||
TitleBar->updateDockWidgetActionsButtons();
|
||||
UpdateTitleBarButtons = false;
|
||||
}
|
||||
|
@ -1065,6 +1065,7 @@ CDockAreaWidget* CDockManager::setCentralWidget(CDockWidget* widget)
|
||||
widget->setFeature(CDockWidget::DockWidgetClosable, false);
|
||||
widget->setFeature(CDockWidget::DockWidgetMovable, false);
|
||||
widget->setFeature(CDockWidget::DockWidgetFloatable, false);
|
||||
widget->setFeature(CDockWidget::DockWidgetPinnable, false);
|
||||
d->CentralWidget = widget;
|
||||
CDockAreaWidget* CentralArea = addDockWidget(CenterDockWidgetArea, widget);
|
||||
CentralArea->setDockAreaFlag(CDockAreaWidget::eDockAreaFlag::HideSingleWidgetTitleBar, true);
|
||||
|
@ -159,7 +159,8 @@ public:
|
||||
DockWidgetForceCloseWithArea = 0x040, ///< dock widget will be closed when the dock area hosting it is closed
|
||||
NoTab = 0x080, ///< dock widget tab will never be shown if this flag is set
|
||||
DeleteContentOnClose = 0x100, ///< deletes only the contained widget on close, keeping the dock widget intact and in place. Attempts to rebuild the contents widget on show if there is a widget factory set.
|
||||
DefaultDockWidgetFeatures = DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable | DockWidgetFocusable,
|
||||
DockWidgetPinnable = 0x200, ///< dock widget can be pinned and added to an overlay widget
|
||||
DefaultDockWidgetFeatures = DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable | DockWidgetFocusable | DockWidgetPinnable,
|
||||
AllDockWidgetFeatures = DefaultDockWidgetFeatures | DockWidgetDeleteOnClose | CustomCloseHandling,
|
||||
DockWidgetAlwaysCloseAndDelete = DockWidgetForceCloseWithArea | DockWidgetDeleteOnClose,
|
||||
NoDockWidgetFeatures = 0x000
|
||||
|
Loading…
Reference in New Issue
Block a user