TabWidgetWidget: Don't hardcode margins, so we support DPI != 96

For people using font DPI instead of DPR
This commit is contained in:
Sergio Martins
2021-07-01 22:17:31 +01:00
parent e1578436d0
commit ced1c4dcc8
2 changed files with 21 additions and 8 deletions

View File

@@ -25,6 +25,7 @@
QT_BEGIN_NAMESPACE
class QAbstractButton;
class QHBoxLayout;
QT_END_NAMESPACE
namespace KDDockWidgets {
@@ -64,9 +65,11 @@ protected:
int currentIndex() const override;
private:
void updateMargins();
void setupTabBarButtons();
Q_DISABLE_COPY(TabWidgetWidget)
TabBar *const m_tabBar;
QHBoxLayout *m_cornerWidgetLayout = nullptr;
QAbstractButton *m_floatButton = nullptr;
QAbstractButton *m_closeButton = nullptr;
};