Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2.0
-
None
Description
When using a QTabBar / QMdiArea Mac::TabbedView: on the Mac, on the right side of the text a empty space is kept as large as the space on the left (for the close icon). This area never is used in the normal case and should be used as well for the text when not enough space is available:
I just added the following lines in MainWindow::MainWindow() of the mdi sample
mdiArea->setViewMode(QMdiArea::TabbedView); mdiArea->setTabsClosable(true); mdiArea->setTabsMovable(true); mdiArea->setDocumentMode(true);
I think that the problem lies in
QMacStylePrivate::tabLayout ... // make text aligned to center if (opt->rightButtonSize.isEmpty()) tr.setRight(tr.right() - 4 - buttonSize);
This just creates the same area on the right. If space is too little this area should be used as well - and the text should be centered within the whole area.
On Windows i dont see such a problem or at least in less extend: