It ensures that for icon-only style it is displayed in the middle and
empty text is not accounted while calculating tab size hint. Custom
styles may need to target `QTabBar[style="icon-only"]` to apply specific
fixes like disabling padding.
Fixes: #14282
This replaces old mechanism that was based on storing tab bar
orientation in user settings with one that delays initialization by half
of a second to ensure that toolbar is placed where in right place.
Right corner is placed to the right edge of screen, so its natural
growth occours on the left side. Basically it is Right to Left order and
so in that case the "end" is actually on left and so TabBar should grow
in that direction.
Unfortunately it is not possible to simply use RTL Qt feature to handle
that case as it would result in reverse order of workbenches (people will still
read it in LTR order) and icons on the right which is not wanted. That's
custom support is introduced.
This should fix issues when toolbar containing Workbench TabBar suddenly
(or not) changes orientation. It also fixes size policies so toolbar
resizes properly and does not cause window to grow.
Fixes: #13286
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.
This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.
Fixes: #13720Fixes: #13630
* Gui: support toolbar drag and drop to status bar and menu bar
ClosesFreeCAD/FreeCAD#12979
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Gui: improve toolbar handling in status and menu bar
* Gui: fix workbench tab bar orientation in status or menu bar
* Gui: remove workbench toolbar position settings
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>