Commit Graph

12 Commits

Author SHA1 Message Date
Kacper Donat
33c6b04461 Gui: Fix wrong orientation of workbench tab bar after start
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.
2024-05-12 19:05:14 +02:00
Kacper Donat
75d43f8607 Gui: Use RTL layout when Wb Tab Bar is placed in right corner
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.
2024-05-12 19:05:14 +02:00
Kacper Donat
727078bbd3 Gui: Adjust sizing of Workbench TabBar when changing orientation
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
2024-05-12 19:05:14 +02:00
Kacper Donat
eb99c8bcda Gui: Add proper tooltip to Workbench TabBar tab 2024-05-12 19:05:14 +02:00
Kacper Donat
3c7487638b Gui: Move more button to the end WB TabBar
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: #13720
Fixes: #13630
2024-05-12 19:05:14 +02:00
Zheng Lei
b00a4384bf Gui: support toolbar drag and drop to status bar and menu bar (#13571)
* Gui: support toolbar drag and drop to status bar and menu bar

Closes FreeCAD/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>
2024-05-06 17:59:16 +02:00
PaddleStroke
2267aa761b Core: TabBar: fix issue following #13508 2024-04-29 10:55:44 -05:00
PaddleStroke
0ebf43a09c TabBar: Move + tab to beginning. 2024-04-22 11:13:12 -05:00
wmayer
c96fd71e4f Fix several compiler warnings
* fix -Winconsistent-missing-override
* fix -Wunused-but-set-variable
* fix -Wunused-parameter
* fix -Wunused-lambda-capture
* fix -Wunused-private-field
* fix -Wpessimizing-move
2024-04-03 10:04:56 +02:00
Ladislav Michl
4054520f08 Gui: WorkbenchSelector: Fix build with Qt6
indexOf is returning qsizetype in Qt6, so use type explicitely.
2024-04-02 16:19:27 +02:00
Ladislav Michl
ec3b89a567 Gui: WorkbenchSelector: Fix whitespaces 2024-04-02 16:19:27 +02:00
PaddleStroke
5d3de598e7 Core: Introduce Tab-Bar workbench selector 2024-04-01 10:35:53 -05:00