1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

Changed type of sideTabBarArea properties to int to fix non working Linux stylesheet selectors

This commit is contained in:
Uwe 2022-10-28 15:20:56 +02:00
parent 6adce7337b
commit f4bfa0f3c5
6 changed files with 11 additions and 11 deletions

View File

@ -53,7 +53,7 @@ class CDockingStateReader;
class ADS_EXPORT CAutoHideDockContainer : public QFrame class ADS_EXPORT CAutoHideDockContainer : public QFrame
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(ads::SideBarLocation sideTabBarArea READ sideTabBarArea) Q_PROPERTY(int sideTabBarArea READ sideTabBarArea)
private: private:
AutoHideDockContainerPrivate* d; ///< private data (pimpl) AutoHideDockContainerPrivate* d; ///< private data (pimpl)
friend struct AutoHideDockContainerPrivate; friend struct AutoHideDockContainerPrivate;

View File

@ -47,7 +47,7 @@ struct DockWidgetSideTabPrivate
{ {
CDockWidgetSideTab* _this; CDockWidgetSideTab* _this;
CDockWidget* DockWidget; CDockWidget* DockWidget;
CSideTabBar* SideTabBar; CSideTabBar* SideTabBar = nullptr;
Qt::Orientation Orientation{Qt::Vertical}; Qt::Orientation Orientation{Qt::Vertical};
/** /**
@ -106,7 +106,7 @@ CDockWidgetSideTab::~CDockWidgetSideTab()
//============================================================================ //============================================================================
void CDockWidgetSideTab::updateStyle() void CDockWidgetSideTab::updateStyle()
{ {
internal::repolishStyle(this, internal::RepolishDirectChildren); internal::repolishStyle(this, internal::RepolishDirectChildren);
update(); update();
} }
@ -114,10 +114,10 @@ void CDockWidgetSideTab::updateStyle()
//============================================================================ //============================================================================
SideBarLocation CDockWidgetSideTab::sideTabBarArea() const SideBarLocation CDockWidgetSideTab::sideTabBarArea() const
{ {
auto dockAreaWidget = d->DockWidget->dockAreaWidget(); if (d->SideTabBar)
if (dockAreaWidget && dockAreaWidget->isAutoHide())
{ {
return dockAreaWidget->autoHideDockContainer()->sideTabBarArea(); qDebug() << "CDockWidgetSideTab::sideTabBarArea() " << d->SideTabBar->sideTabBarArea();
return d->SideTabBar->sideTabBarArea();
} }
return Left; return Left;

View File

@ -50,7 +50,7 @@ class ADS_EXPORT CDockWidgetSideTab : public CPushButton
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(ads::SideBarLocation sideTabBarArea READ sideTabBarArea) Q_PROPERTY(int sideTabBarArea READ sideTabBarArea)
Q_PROPERTY(Qt::Orientation orientation READ orientation) Q_PROPERTY(Qt::Orientation orientation READ orientation)
Q_PROPERTY(bool activeTab READ isActiveTab) Q_PROPERTY(bool activeTab READ isActiveTab)

View File

@ -24,7 +24,7 @@ class ADS_EXPORT CResizeHandle : public QFrame
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(CResizeHandle) Q_DISABLE_COPY(CResizeHandle)
Q_PROPERTY(bool opaqueResize READ opaqueResize WRITE setOpaqueResize) Q_PROPERTY(bool opaqueResize READ opaqueResize WRITE setOpaqueResize)
private: private:
ResizeHandlePrivate* d; ///< private data (pimpl) ResizeHandlePrivate* d; ///< private data (pimpl)
friend struct ResizeHandlePrivate; friend struct ResizeHandlePrivate;

View File

@ -128,10 +128,10 @@ CSideTabBar::~CSideTabBar()
//============================================================================ //============================================================================
void CSideTabBar::insertSideTab(int Index, CDockWidgetSideTab* SideTab) void CSideTabBar::insertSideTab(int Index, CDockWidgetSideTab* SideTab)
{ {
SideTab->updateOrientationForArea(d->SideTabArea);
SideTab->installEventFilter(this); SideTab->installEventFilter(this);
d->TabsLayout->insertWidget(Index, SideTab);
SideTab->setSideTabBar(this); SideTab->setSideTabBar(this);
SideTab->updateOrientationForArea(d->SideTabArea);
d->TabsLayout->insertWidget(Index, SideTab);
show(); show();
} }

View File

@ -50,7 +50,7 @@ class CAutoHideDockContainer;
class ADS_EXPORT CSideTabBar : public QFrame class ADS_EXPORT CSideTabBar : public QFrame
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(ads::SideBarLocation sideTabBarArea READ sideTabBarArea) Q_PROPERTY(int sideTabBarArea READ sideTabBarArea)
Q_PROPERTY(Qt::Orientation orientation READ orientation) Q_PROPERTY(Qt::Orientation orientation READ orientation)
private: private: