forked from qt-creator/qt-creator
ADS: Integrate newest base repository commits
* Update to newest version of ADS * Fix memory leak in DockContainerWidget Base repository was merged until commit 59b4dfb89c0c9c0e6035fe580088432312ed2d09 Change-Id: I357b21888fe6f0ec2160c8688d84cb7ecdcad079 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
d0fccdc025
commit
e16a302a43
@@ -66,7 +66,8 @@ enum eTitleBarButton {
|
||||
TitleBarButtonTabsMenu,
|
||||
TitleBarButtonUndock,
|
||||
TitleBarButtonClose,
|
||||
TitleBarButtonAutoHide
|
||||
TitleBarButtonAutoHide,
|
||||
TitleBarButtonMinimize
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -88,6 +89,7 @@ enum eIcon {
|
||||
DockAreaMenuIcon, //!< DockAreaMenuIcon
|
||||
DockAreaUndockIcon, //!< DockAreaUndockIcon
|
||||
DockAreaCloseIcon, //!< DockAreaCloseIcon
|
||||
DockAreaMinimizeIcon,
|
||||
FloatingWidgetCloseIcon, //!< FloatingWidgetCloseIcon
|
||||
FloatingWidgetNormalIcon, //!< FloatingWidgetNormalIcon
|
||||
FloatingWidgetMaximizeIcon, //!< FloatingWidgetMaximizeIcon
|
||||
|
@@ -48,10 +48,11 @@ public:
|
||||
QPointer<TitleBarButton> m_autoHideButton;
|
||||
QPointer<TitleBarButton> m_undockButton;
|
||||
QPointer<TitleBarButton> m_closeButton;
|
||||
QPointer<TitleBarButton> m_minimizeButton;
|
||||
QBoxLayout *m_layout = nullptr;
|
||||
DockAreaWidget *m_dockArea = nullptr;
|
||||
DockAreaTabBar *m_tabBar = nullptr;
|
||||
ElidingLabel *m_autoHideTitleLabel;
|
||||
ElidingLabel *m_autoHideTitleLabel = nullptr;
|
||||
bool m_menuOutdated = true;
|
||||
QMenu *m_tabsMenu;
|
||||
QList<TitleBarButtonType *> m_dockWidgetActionsButtons;
|
||||
@@ -202,6 +203,23 @@ void DockAreaTitleBarPrivate::createButtons()
|
||||
q,
|
||||
&DockAreaTitleBar::onAutoHideButtonClicked);
|
||||
|
||||
// Minimize button
|
||||
m_minimizeButton = new TitleBarButton(
|
||||
testAutoHideConfigFlag(DockManager::AutoHideHasMinimizeButton));
|
||||
m_minimizeButton->setObjectName("dockAreaMinimizeButton");
|
||||
//m_minimizeButton->setAutoRaise(true);
|
||||
m_minimizeButton->setVisible(false);
|
||||
internal::setButtonIcon(m_minimizeButton,
|
||||
QStyle::SP_TitleBarMinButton,
|
||||
ADS::DockAreaMinimizeIcon);
|
||||
internal::setToolTip(m_minimizeButton, QObject::tr("Minimize"));
|
||||
m_minimizeButton->setSizePolicy(sizePolicy);
|
||||
m_layout->addWidget(m_minimizeButton, 0);
|
||||
QObject::connect(m_minimizeButton,
|
||||
&QToolButton::clicked,
|
||||
q,
|
||||
&DockAreaTitleBar::minimizeAutoHideContainer);
|
||||
|
||||
// Close button
|
||||
m_closeButton = new TitleBarButton(testConfigFlag(DockManager::DockAreaHasCloseButton));
|
||||
m_closeButton->setObjectName("dockAreaCloseButton");
|
||||
@@ -228,7 +246,10 @@ void DockAreaTitleBarPrivate::createAutoHideTitleLabel()
|
||||
{
|
||||
m_autoHideTitleLabel = new ElidingLabel("");
|
||||
m_autoHideTitleLabel->setObjectName("autoHideTitleLabel");
|
||||
m_layout->addWidget(m_autoHideTitleLabel);
|
||||
// At position 0 is the tab bar - insert behind tab bar
|
||||
m_layout->insertWidget(1, m_autoHideTitleLabel);
|
||||
m_autoHideTitleLabel->setVisible(false); // Default hidden
|
||||
m_layout->insertWidget(2, new SpacerWidget(q));
|
||||
}
|
||||
void DockAreaTitleBarPrivate::createTabBar()
|
||||
{
|
||||
@@ -370,10 +391,8 @@ DockAreaTitleBar::DockAreaTitleBar(DockAreaWidget *parent)
|
||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||
|
||||
d->createTabBar();
|
||||
d->createAutoHideTitleLabel();
|
||||
d->m_autoHideTitleLabel->setVisible(false); // Default hidden
|
||||
d->m_layout->addWidget(new SpacerWidget(this));
|
||||
d->createButtons();
|
||||
d->createAutoHideTitleLabel();
|
||||
setFocusPolicy(Qt::NoFocus);
|
||||
}
|
||||
|
||||
@@ -452,6 +471,18 @@ void DockAreaTitleBar::onCloseButtonClicked()
|
||||
d->m_dockArea->closeArea();
|
||||
}
|
||||
|
||||
void DockAreaTitleBar::onAutoHideCloseActionTriggered()
|
||||
{
|
||||
d->m_dockArea->closeArea();
|
||||
}
|
||||
|
||||
void DockAreaTitleBar::minimizeAutoHideContainer()
|
||||
{
|
||||
auto autoHideContainer = d->m_dockArea->autoHideDockContainer();
|
||||
if (autoHideContainer)
|
||||
autoHideContainer->collapseView(true);
|
||||
}
|
||||
|
||||
void DockAreaTitleBar::onUndockButtonClicked()
|
||||
{
|
||||
if (d->m_dockArea->features().testFlag(DockWidget::DockWidgetFloatable))
|
||||
@@ -543,6 +574,8 @@ TitleBarButton *DockAreaTitleBar::button(eTitleBarButton which) const
|
||||
return d->m_closeButton;
|
||||
case TitleBarButtonAutoHide:
|
||||
return d->m_autoHideButton;
|
||||
case TitleBarButtonMinimize:
|
||||
return d->m_minimizeButton;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -686,12 +719,28 @@ void DockAreaTitleBar::contextMenuEvent(QContextMenuEvent *event)
|
||||
}
|
||||
menu.addSeparator();
|
||||
}
|
||||
QAction *closeAction = menu.addAction(isAutoHide ? Tr::tr("Close") : Tr::tr("Close Group"));
|
||||
|
||||
if (isAutoHide) {
|
||||
QAction *minimizeAction = menu.addAction(Tr::tr("Minimize"));
|
||||
minimizeAction->connect(minimizeAction,
|
||||
&QAction::triggered,
|
||||
this,
|
||||
&DockAreaTitleBar::minimizeAutoHideContainer);
|
||||
|
||||
QAction *closeAction = menu.addAction(Tr::tr("Close"));
|
||||
closeAction->connect(closeAction,
|
||||
&QAction::triggered,
|
||||
this,
|
||||
&DockAreaTitleBar::onAutoHideCloseActionTriggered);
|
||||
closeAction->setEnabled(d->m_dockArea->features().testFlag(DockWidget::DockWidgetClosable));
|
||||
} else {
|
||||
QAction *closeAction = menu.addAction(Tr::tr("Close Group"));
|
||||
closeAction->connect(closeAction,
|
||||
&QAction::triggered,
|
||||
this,
|
||||
&DockAreaTitleBar::onCloseButtonClicked);
|
||||
closeAction->setEnabled(d->m_dockArea->features().testFlag(DockWidget::DockWidgetClosable));
|
||||
}
|
||||
|
||||
if (!isAutoHide && !isTopLevelArea) {
|
||||
QAction *closeOthersAction = menu.addAction(Tr::tr("Close Other Groups"));
|
||||
@@ -728,8 +777,11 @@ QString DockAreaTitleBar::titleBarButtonToolTip(eTitleBarButton button) const
|
||||
break;
|
||||
|
||||
case TitleBarButtonClose:
|
||||
if (d->m_dockArea->isAutoHide())
|
||||
return Tr::tr("Close");
|
||||
if (d->m_dockArea->isAutoHide()) {
|
||||
bool minimize = DockManager::testAutoHideConfigFlag(
|
||||
DockManager::AutoHideCloseButtonCollapsesDock);
|
||||
return minimize ? Tr::tr("Minimize") : Tr::tr("Close");
|
||||
}
|
||||
|
||||
if (DockManager::testConfigFlag(DockManager::DockAreaCloseButtonClosesTab))
|
||||
return Tr::tr("Close Active Tab");
|
||||
@@ -758,4 +810,11 @@ void DockAreaTitleBar::setAreaFloating()
|
||||
d->makeAreaFloating(mapFromGlobal(QCursor::pos()), DraggingInactive);
|
||||
}
|
||||
|
||||
void DockAreaTitleBar::showAutoHideControls(bool show)
|
||||
{
|
||||
d->m_tabBar->setVisible(!show); // Auto hide toolbar never has tabs
|
||||
d->m_minimizeButton->setVisible(show);
|
||||
d->m_autoHideTitleLabel->setVisible(show);
|
||||
}
|
||||
|
||||
} // namespace ADS
|
||||
|
@@ -84,6 +84,8 @@ private:
|
||||
|
||||
void onTabsMenuAboutToShow();
|
||||
void onCloseButtonClicked();
|
||||
void onAutoHideCloseActionTriggered();
|
||||
void minimizeAutoHideContainer();
|
||||
void onUndockButtonClicked();
|
||||
void onTabsMenuActionTriggered(QAction *action);
|
||||
void onCurrentTabChanged(int index);
|
||||
@@ -191,6 +193,11 @@ public:
|
||||
*/
|
||||
void setAreaFloating();
|
||||
|
||||
/**
|
||||
* Call this function, to create all the required auto hide controls
|
||||
*/
|
||||
void showAutoHideControls(bool show);
|
||||
|
||||
signals:
|
||||
/**
|
||||
* This signal is emitted if a tab in the tab bar is clicked by the user
|
||||
|
@@ -295,13 +295,20 @@ void DockAreaWidgetPrivate::updateTitleBarButtonVisibility(bool isTopLevel)
|
||||
if (!container)
|
||||
return;
|
||||
|
||||
if (isTopLevel) {
|
||||
bool isAutoHide = q->isAutoHide();
|
||||
if (isAutoHide) {
|
||||
bool showCloseButton = DockManager::autoHideConfigFlags().testFlag(
|
||||
DockManager::AutoHideHasCloseButton);
|
||||
m_titleBar->button(TitleBarButtonClose)->setVisible(showCloseButton);
|
||||
m_titleBar->button(TitleBarButtonAutoHide)->setVisible(true);
|
||||
m_titleBar->button(TitleBarButtonUndock)->setVisible(false);
|
||||
m_titleBar->button(TitleBarButtonTabsMenu)->setVisible(false);
|
||||
} else if (isTopLevel) {
|
||||
m_titleBar->button(TitleBarButtonClose)->setVisible(!container->isFloating());
|
||||
m_titleBar->button(TitleBarButtonAutoHide)->setVisible(!container->isFloating());
|
||||
// Undock and tabs should never show when auto hidden
|
||||
m_titleBar->button(TitleBarButtonUndock)
|
||||
->setVisible(!container->isFloating() && !q->isAutoHide());
|
||||
m_titleBar->button(TitleBarButtonTabsMenu)->setVisible(!q->isAutoHide());
|
||||
m_titleBar->button(TitleBarButtonUndock)->setVisible(!container->isFloating());
|
||||
m_titleBar->button(TitleBarButtonTabsMenu)->setVisible(true);
|
||||
} else {
|
||||
m_titleBar->button(TitleBarButtonClose)->setVisible(true);
|
||||
m_titleBar->button(TitleBarButtonAutoHide)->setVisible(true);
|
||||
@@ -650,10 +657,7 @@ void DockAreaWidget::updateTitleBarVisibility()
|
||||
}
|
||||
|
||||
if (isAutoHideFeatureEnabled()) {
|
||||
auto tabBar = d->m_titleBar->tabBar();
|
||||
tabBar->setVisible(!autoHide); // Never show tab bar when auto hidden
|
||||
// Always show when auto hidden, never otherwise
|
||||
d->m_titleBar->autoHideTitleLabel()->setVisible(autoHide);
|
||||
d->m_titleBar->showAutoHideControls(autoHide);
|
||||
updateTitleBarButtonVisibility(container->topLevelDockArea() == this);
|
||||
}
|
||||
}
|
||||
|
@@ -484,9 +484,10 @@ void DockContainerWidgetPrivate::dropIntoSection(FloatingDockContainer *floating
|
||||
|
||||
if (!targetAreaSplitter) {
|
||||
auto splitter = createSplitter(insertParam.orientation());
|
||||
m_layout->replaceWidget(targetArea, splitter);
|
||||
QLayoutItem *layoutItem = m_layout->replaceWidget(targetArea, splitter);
|
||||
splitter->addWidget(targetArea);
|
||||
targetAreaSplitter = splitter;
|
||||
delete layoutItem;
|
||||
}
|
||||
int areaIndex = targetAreaSplitter->indexOf(targetArea);
|
||||
auto floatingSplitter = floatingContainer->rootSplitter();
|
||||
@@ -1532,10 +1533,11 @@ bool DockContainerWidget::restoreState(DockingStateReader &stateReader, bool tes
|
||||
if (!newRootSplitter)
|
||||
newRootSplitter = d->createSplitter(Qt::Horizontal);
|
||||
|
||||
d->m_layout->replaceWidget(d->m_rootSplitter, newRootSplitter);
|
||||
QLayoutItem *layoutItem = d->m_layout->replaceWidget(d->m_rootSplitter, newRootSplitter);
|
||||
auto oldRoot = d->m_rootSplitter;
|
||||
d->m_rootSplitter = qobject_cast<DockSplitter *>(newRootSplitter);
|
||||
oldRoot->deleteLater();
|
||||
delete layoutItem;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -87,6 +87,11 @@ public:
|
||||
DockWidget *m_centralWidget = nullptr;
|
||||
bool m_isLeavingMinimized = false;
|
||||
|
||||
Qt::ToolButtonStyle m_toolBarStyleDocked = Qt::ToolButtonIconOnly;
|
||||
Qt::ToolButtonStyle m_toolBarStyleFloating = Qt::ToolButtonTextUnderIcon;
|
||||
QSize m_toolBarIconSizeDocked = QSize(16, 16);
|
||||
QSize m_toolBarIconSizeFloating = QSize(24, 24);
|
||||
|
||||
QString m_workspacePresetsPath;
|
||||
QList<Workspace> m_workspaces;
|
||||
Workspace m_workspace;
|
||||
@@ -769,6 +774,38 @@ QString DockManager::floatingContainersTitle()
|
||||
return g_floatingContainersTitle;
|
||||
}
|
||||
|
||||
void DockManager::setDockWidgetToolBarStyle(Qt::ToolButtonStyle style, DockWidget::eState state)
|
||||
{
|
||||
if (DockWidget::StateFloating == state)
|
||||
d->m_toolBarStyleFloating = style;
|
||||
else
|
||||
d->m_toolBarStyleDocked = style;
|
||||
}
|
||||
|
||||
Qt::ToolButtonStyle DockManager::dockWidgetToolBarStyle(DockWidget::eState state) const
|
||||
{
|
||||
if (DockWidget::StateFloating == state)
|
||||
return d->m_toolBarStyleFloating;
|
||||
else
|
||||
return d->m_toolBarStyleDocked;
|
||||
}
|
||||
|
||||
void DockManager::setDockWidgetToolBarIconSize(const QSize &iconSize, DockWidget::eState state)
|
||||
{
|
||||
if (DockWidget::StateFloating == state)
|
||||
d->m_toolBarIconSizeFloating = iconSize;
|
||||
else
|
||||
d->m_toolBarIconSizeDocked = iconSize;
|
||||
}
|
||||
|
||||
QSize DockManager::dockWidgetToolBarIconSize(DockWidget::eState state) const
|
||||
{
|
||||
if (DockWidget::StateFloating == state)
|
||||
return d->m_toolBarIconSizeFloating;
|
||||
else
|
||||
return d->m_toolBarIconSizeDocked;
|
||||
}
|
||||
|
||||
DockWidget *DockManager::centralWidget() const
|
||||
{
|
||||
return d->m_centralWidget;
|
||||
|
@@ -186,10 +186,13 @@ public:
|
||||
= 0x20, ///< show the auto hide window on mouse over tab and hide it if mouse leaves auto hide container
|
||||
AutoHideCloseButtonCollapsesDock
|
||||
= 0x40, ///< Close button of an auto hide container collapses the dock instead of hiding it completely
|
||||
AutoHideHasCloseButton
|
||||
= 0x80, //< If the flag is set an auto hide title bar has a close button
|
||||
AutoHideHasMinimizeButton
|
||||
= 0x100, ///< if this flag is set, the auto hide title bar has a minimize button to collapse the dock widget
|
||||
|
||||
DefaultAutoHideConfig
|
||||
= AutoHideFeatureEnabled | DockAreaHasAutoHideButton
|
||||
| AutoHideCloseButtonCollapsesDock ///< the default configuration for left and right side bars
|
||||
DefaultAutoHideConfig = AutoHideFeatureEnabled | DockAreaHasAutoHideButton
|
||||
| AutoHideCloseButtonCollapsesDock | AutoHideHasCloseButton
|
||||
};
|
||||
Q_DECLARE_FLAGS(AutoHideFlags, eAutoHideFlag)
|
||||
|
||||
@@ -452,6 +455,31 @@ public:
|
||||
*/
|
||||
static QString floatingContainersTitle();
|
||||
|
||||
/**
|
||||
* This function sets the tool button style for the given dock widget state. It is possible to
|
||||
* switch the tool button style depending on the state. If a dock widget is floating, then here
|
||||
* are more space and it is possible to select a style that requires more space like
|
||||
* Qt::ToolButtonTextUnderIcon. For the docked state Qt::ToolButtonIconOnly might be better.
|
||||
*/
|
||||
void setDockWidgetToolBarStyle(Qt::ToolButtonStyle style, DockWidget::eState state);
|
||||
|
||||
/**
|
||||
* Returns the tool button style for the given docking state. \see setToolBarStyle()
|
||||
*/
|
||||
Qt::ToolButtonStyle dockWidgetToolBarStyle(DockWidget::eState state) const;
|
||||
|
||||
/**
|
||||
* This function sets the tool button icon size for the given state. If a dock widget is
|
||||
* floating, there is more space and increasing the icon size is possible. For docked widgets,
|
||||
* small icon sizes, eg. 16 x 16 might be better.
|
||||
*/
|
||||
void setDockWidgetToolBarIconSize(const QSize &iconSize, DockWidget::eState state);
|
||||
|
||||
/**
|
||||
* Returns the icon size for a given docking state. \see setToolBarIconSize()
|
||||
*/
|
||||
QSize dockWidgetToolBarIconSize(DockWidget::eState state) const;
|
||||
|
||||
/**
|
||||
* This function returns managers central widget or nullptr if no central widget is set.
|
||||
*/
|
||||
|
@@ -64,6 +64,7 @@ public:
|
||||
= DockWidget::MinimumSizeHintFromDockWidget;
|
||||
WidgetFactory *m_factory = nullptr;
|
||||
QPointer<AutoHideTab> m_sideTabWidget;
|
||||
DockWidget::eToolBarStyleSource m_toolBarStyleSource = DockWidget::ToolBarStyleFromDockManager;
|
||||
|
||||
/**
|
||||
* Private data constructor
|
||||
@@ -106,6 +107,11 @@ public:
|
||||
* Creates the content widget with the registered widget factory and returns true on success.
|
||||
*/
|
||||
bool createWidgetFromFactory();
|
||||
|
||||
/**
|
||||
* Use the dock manager toolbar style and icon size for the different states
|
||||
*/
|
||||
void setToolBarStyleFromDockManager();
|
||||
}; // class DockWidgetPrivate
|
||||
|
||||
DockWidgetPrivate::DockWidgetPrivate(DockWidget *parent)
|
||||
@@ -246,6 +252,19 @@ bool DockWidgetPrivate::createWidgetFromFactory()
|
||||
return true;
|
||||
}
|
||||
|
||||
void DockWidgetPrivate::setToolBarStyleFromDockManager()
|
||||
{
|
||||
if (!m_dockManager)
|
||||
return;
|
||||
|
||||
auto state = DockWidget::StateDocked;
|
||||
q->setToolBarIconSize(m_dockManager->dockWidgetToolBarIconSize(state), state);
|
||||
q->setToolBarStyle(m_dockManager->dockWidgetToolBarStyle(state), state);
|
||||
state = DockWidget::StateFloating;
|
||||
q->setToolBarIconSize(m_dockManager->dockWidgetToolBarIconSize(state), state);
|
||||
q->setToolBarStyle(m_dockManager->dockWidgetToolBarStyle(state), state);
|
||||
}
|
||||
|
||||
DockWidget::DockWidget(const QString &uniqueId, QWidget *parent)
|
||||
: QFrame(parent)
|
||||
, d(new DockWidgetPrivate(this))
|
||||
@@ -381,6 +400,12 @@ DockManager *DockWidget::dockManager() const
|
||||
void DockWidget::setDockManager(DockManager *dockManager)
|
||||
{
|
||||
d->m_dockManager = dockManager;
|
||||
|
||||
if (!dockManager)
|
||||
return;
|
||||
|
||||
if (ToolBarStyleFromDockManager == d->m_toolBarStyleSource)
|
||||
d->setToolBarStyleFromDockManager();
|
||||
}
|
||||
|
||||
DockContainerWidget *DockWidget::dockContainer() const
|
||||
@@ -491,6 +516,18 @@ QAction *DockWidget::toggleViewAction() const
|
||||
return d->m_toggleViewAction;
|
||||
}
|
||||
|
||||
void DockWidget::setToggleViewAction(QAction *action)
|
||||
{
|
||||
if (!action)
|
||||
return;
|
||||
|
||||
d->m_toggleViewAction->setParent(nullptr);
|
||||
delete d->m_toggleViewAction;
|
||||
d->m_toggleViewAction = action;
|
||||
d->m_toggleViewAction->setParent(this);
|
||||
connect(d->m_toggleViewAction, &QAction::triggered, this, &DockWidget::toggleView);
|
||||
}
|
||||
|
||||
void DockWidget::setToggleViewActionMode(eToggleViewActionMode mode)
|
||||
{
|
||||
if (ActionModeToggle == mode) {
|
||||
@@ -693,6 +730,18 @@ void DockWidget::setToolBar(QToolBar *toolBar)
|
||||
setToolbarFloatingStyle(isFloating());
|
||||
}
|
||||
|
||||
void DockWidget::setToolBarStyleSource(eToolBarStyleSource source)
|
||||
{
|
||||
d->m_toolBarStyleSource = source;
|
||||
if (ToolBarStyleFromDockManager == d->m_toolBarStyleSource)
|
||||
d->setToolBarStyleFromDockManager();
|
||||
}
|
||||
|
||||
DockWidget::eToolBarStyleSource DockWidget::toolBarStyleSource() const
|
||||
{
|
||||
return d->m_toolBarStyleSource;
|
||||
}
|
||||
|
||||
void DockWidget::setToolBarStyle(Qt::ToolButtonStyle style, eState state)
|
||||
{
|
||||
if (StateFloating == state)
|
||||
|
@@ -154,6 +154,8 @@ public:
|
||||
|
||||
enum eState { StateHidden, StateDocked, StateFloating };
|
||||
|
||||
enum eToolBarStyleSource { ToolBarStyleFromDockManager, ToolBarStyleFromDockWidget };
|
||||
|
||||
/**
|
||||
* Sets the widget for the dock widget to widget.
|
||||
* The InsertMode defines how the widget is inserted into the dock widget.
|
||||
@@ -385,6 +387,12 @@ public:
|
||||
*/
|
||||
QAction *toggleViewAction() const;
|
||||
|
||||
/**
|
||||
* Use provided action to be the default toggle view action for this dock widget.
|
||||
* This dock widget now owns the action.
|
||||
*/
|
||||
void setToggleViewAction(QAction *action);
|
||||
|
||||
/**
|
||||
* Configures the behavior of the toggle view action.
|
||||
* \see eToggleViewActionMode for a detailed description
|
||||
@@ -443,6 +451,17 @@ public:
|
||||
*/
|
||||
void setToolBar(QToolBar *toolBar);
|
||||
|
||||
/**
|
||||
* Configures, if the dock widget uses the global tool bar styles from
|
||||
* dock manager or if it uses its own tool bar style
|
||||
*/
|
||||
void setToolBarStyleSource(eToolBarStyleSource source);
|
||||
|
||||
/**
|
||||
* Returns the configured tool bar style source
|
||||
*/
|
||||
eToolBarStyleSource toolBarStyleSource() const;
|
||||
|
||||
/**
|
||||
* This function sets the tool button style for the given dock widget state.
|
||||
* It is possible to switch the tool button style depending on the state.
|
||||
|
@@ -286,7 +286,8 @@ ADS--AutoHideDockContainer ADS--DockAreaWidget[focused="true"] ADS--DockAreaTitl
|
||||
|
||||
/* AutoHideDockContainer titlebar buttons */
|
||||
#dockAreaAutoHideButton {
|
||||
/*qproperty-icon: url(:/ads/images/vs-pin-button.svg);*/
|
||||
/*qproperty-icon: url(:/ads/images/vs-pin-button.svg),
|
||||
url(:/ads/images/vs-pin-button-disabled.svg) disabled;*/
|
||||
qproperty-iconSize: 16px;
|
||||
}
|
||||
|
||||
@@ -295,6 +296,11 @@ ADS--AutoHideDockContainer #dockAreaAutoHideButton {
|
||||
qproperty-iconSize: 16px;
|
||||
}
|
||||
|
||||
ADS--AutoHideDockContainer #dockAreaMinimizeButton {
|
||||
/*qproperty-icon: url(:/ads/images/minimize-button-focused.svg);*/
|
||||
qproperty-iconSize: 16px;
|
||||
}
|
||||
|
||||
ADS--AutoHideDockContainer #dockAreaCloseButton{
|
||||
/*qproperty-icon: url(:/ads/images/close-button-focused.svg)*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user