diff --git a/src/DockAreaTitleBar.cpp b/src/DockAreaTitleBar.cpp
index da8721c..2501185 100644
--- a/src/DockAreaTitleBar.cpp
+++ b/src/DockAreaTitleBar.cpp
@@ -93,15 +93,9 @@ void DockAreaTitleBarPrivate::createButtons()
CloseButton = new tTileBarButton();
CloseButton->setObjectName("closeButton");
CloseButton->setFlat(true);
- QPixmap ClosePixmap = _this->style()->standardPixmap(QStyle::SP_TitleBarCloseButton);
- QIcon CloseIcon;
- QStyleOptionButton option;
- option.initFrom(CloseButton);
- QPixmap ClosePixmapDisabled = _this->style()->generatedIconPixmap(QIcon::Disabled, ClosePixmap, &option);
- CloseIcon.addPixmap(ClosePixmap, QIcon::Active);
- CloseIcon.addPixmap(ClosePixmapDisabled, QIcon::Disabled);
+ QIcon CloseIcon(":/ads/close-button.svg");
+ CloseIcon.addFile(":/ads/close-button-disabled.svg", QSize(), QIcon::Disabled);
CloseButton->setIcon(CloseIcon);
- //CloseButton->setIcon(QIcon(":/ads/close.svg"));
CloseButton->setToolTip(QObject::tr("Close"));
CloseButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
TopLayout->addWidget(CloseButton, 0);
diff --git a/src/FloatingDockContainer.cpp b/src/FloatingDockContainer.cpp
index 2aa3638..db82c7f 100644
--- a/src/FloatingDockContainer.cpp
+++ b/src/FloatingDockContainer.cpp
@@ -460,19 +460,7 @@ void CFloatingDockContainer::moveFloating()
//============================================================================
bool CFloatingDockContainer::isClosable() const
{
- auto OpenDockAreas = d->DockContainer->openedDockAreas();
- for (auto DockArea : OpenDockAreas)
- {
- auto OpenDockWidgets = DockArea->openedDockWidgets();
- for (auto DockWidget : OpenDockWidgets)
- {
- if (!DockWidget->features().testFlag(CDockWidget::DockWidgetClosable))
- {
- return false;
- }
- }
- }
- return true;
+ return d->DockContainer->features().testFlag(CDockWidget::DockWidgetClosable);
}
@@ -482,7 +470,7 @@ void CFloatingDockContainer::onDockAreasAddedOrRemoved()
qDebug() << "CFloatingDockContainer::onDockAreasAddedOrRemoved()";
if (d->DockContainer->visibleDockAreaCount() == 1)
{
- d->SingleDockArea = topLevelDockWidget()->dockAreaWidget();
+ d->SingleDockArea = d->DockContainer->openedDockAreas()[0];
this->setWindowTitle(d->SingleDockArea->currentDockWidget()->windowTitle());
connect(d->SingleDockArea, SIGNAL(currentChanged(int)), this,
SLOT(onDockAreaCurrentChanged(int)));
diff --git a/src/ads.qrc b/src/ads.qrc
index 9ffc7aa..161413c 100644
--- a/src/ads.qrc
+++ b/src/ads.qrc
@@ -2,5 +2,7 @@
stylesheets/default.css
close.svg
+ close-button.svg
+ close-button-disabled.svg
diff --git a/src/close-button-disabled.svg b/src/close-button-disabled.svg
new file mode 100644
index 0000000..7bce2a8
--- /dev/null
+++ b/src/close-button-disabled.svg
@@ -0,0 +1,122 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/close-button.svg b/src/close-button.svg
new file mode 100644
index 0000000..e6254df
--- /dev/null
+++ b/src/close-button.svg
@@ -0,0 +1,119 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/close.svg b/src/close.svg
new file mode 100644
index 0000000..7a797be
--- /dev/null
+++ b/src/close.svg
@@ -0,0 +1,74 @@
+
+