Commit Graph

5762 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
Kacper Donat
90dc3e3370 Gui: Add our ToolBarArea enumeration
This refactors implementation of toolbars in menu / status bar a bit. It
introduces enum with all possible areas like it is in Qt that can be
later used to decide what to do based on toolbar placement.
2024-05-12 19:05:12 +02:00
wmayer
03715005f8 Gui: Fix PythonWrapper::toEnum() to also accept a Python int as argument
See https://github.com/FreeCAD/FreeCAD/pull/13611#issuecomment-2097126565
2024-05-09 01:28:45 -04:00
wmayer
58988a7482 Core: Fix memory leaks with PySequence_GetItem 2024-05-08 23:40:27 +02:00
Furgo
5dc4a45afe Change property view panel title to sentence case 2024-05-08 10:04:50 +02:00
wmayer
254d6ea3fd Core: Refactor several methods of ToolBarManager 2024-05-07 19:48:33 +02:00
wmayer
ef682370f9 Core: Fix linter warnings 2024-05-07 19:48:33 +02:00
wmayer
ac48d2bfb0 Core: Fix build failures and warnings 2024-05-07 19:48:33 +02:00
bgbsww
fd53ab3c9b Update ToolBarManager.cpp for QT 6.7
Replace obsoleted method call
2024-05-07 10:18:15 -05:00
PaddleStroke
e3a5ef3504 TechDraw: Smart Dimension tool : Integrate chain and coord dimensions. 2024-05-06 18:40:46 +02:00
PaddleStroke
71b924e7dc Core/Sketcher: Create ToolHandler class in core for core reuse accross other wbs. 2024-05-06 18:40:46 +02:00
PaddleStroke
9f240c525c Assembly: Fixes slider special move mode.Fixes #13370 2024-05-06 18:32:00 +02:00
PaddleStroke
0f08a05b7f Core: Fix GreedySelection: clicking on empty space was clearing selection while greedyselection was active. Fixes #12884 2024-05-06 18:32:00 +02:00
PaddleStroke
29628d2817 Gui: SoFCCSysDragger : replace SoPickStyle::SHAPE by SoPickStyle::SHAPE_ON_TOP, to avoid the impossibility to select the dragger if selection is not disabled and a solid is behind the dragger. In transform tool it does not happen because selection is disabled. 2024-05-06 18:32:00 +02:00
PaddleStroke
e7477f727f Assembly: Fix Object disappears when dragging with slider #12449 2024-05-06 18:32:00 +02:00
Kacper Donat
330c7f4eaa Gui: Remove redundant overlay header
Fixes: #13349
2024-05-06 18:26:05 +02:00
wmayer
a2037c9dc4 Gui: Replace TreeRank property with a simple int
This fixes that copied & pasted objects are not added at the end of the tree view.
See https://forum.freecad.org/viewtopic.php?p=755532#p755532
2024-05-06 18:24:20 +02:00
wmayer
7eeb3a43cc Gui: Do not reset placement when reordering top-level objects
This fixes #13690: Reordering top level objects destroys the Placement
2024-05-06 18:24:20 +02:00
wmayer
d37fb29b36 Gui: fix some linter warnings 2024-05-06 18:24:20 +02:00
Chris Hennes
a5d8aaa21c Update translations
Also removes Web from translation scripts.
2024-05-06 18:17:53 +02:00
PaddleStroke
818e122420 Core / Measure: Introduce QuickMeasure 2024-05-06 18:12:14 +02:00
wmayer
0611f3fc99 Gui: simplify MainWindow::showDocumentation()
The Help module is now part of FreeCAD. So, there is no need any more to run the addon manager
2024-05-06 18:04:13 +02:00
Max Wilfinger
36218444b4 Add Std_Measure command to tool menu. (#13777) 2024-05-06 11:02:50 -05:00
Martin Rodriguez Reboredo
51987dc1ab Fixups with Qt6 enums (#13611)
* Python PySide enums to C++ converter

* Python IntFlags to C++ int in getStandardButtons

* Remove int conversion in mods Python sources
2024-05-06 18:02:18 +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
farley
8f7424820c Update Tree.cpp
- Disable document activation when right-clicking
2024-05-06 17:57:15 +02:00
Bas Ruigrok
98320cc839 Gui: Improve lookAtPoint (#13556)
* Gui: Rename NavigationStyle::pan to setupPanningPlane

* Gui: Replace duplicate code with NavigationStyle::setupPanningPlane

* Gui: Use panning plane when hit point not found in lookAtPoint

Also enables navigation animations when pressing MMB while the mouse is not over an object

* Gui: Remove unused methods
2024-05-06 10:45:14 -05:00
wmayer
34837d7e9f PD: Fix crash when adding sketch to loft via tree view
The underlying problem is the method DocumentItem::updateItemSelection() where
the selection is altered. This may cause the destruction and recreation of the
DocumentObjectItems so that the passed pointer can become dangling.

The issue is fixed in two steps:
1. Add the method 'DocumentObjectItem *findItem(App::DocumentObject* obj, const std::string& subname) const'
   to safely re-access the item.
2. Add a boolean flag 'dirtyFlag' and the methods insertItem() and removeItem() to DocumentObjectData.
   This is needed to check when the iterator over the container becomes invalid.
2024-05-06 17:38:59 +02:00
wmayer
281230c520 Core: Fix possible race conditions when reading or writing config file 2024-05-06 13:24:17 +02:00
Chris Hennes
984e4df2a1 Themes: Explicitly remove Editor/Text setting in Classic 2024-05-05 13:46:14 +02:00
wmayer
d94f01614b Core: Set tab title for MDIViewPyWrap 2024-05-03 14:18:00 +02:00
Chris Hennes
d112e8661f Merge pull request #13727 from wwmayer/fix_warnings
Fix compiler warnings
2024-05-01 10:29:21 -05:00
wmayer
2d41a7eb12 Gui: fix possible build failure 2024-05-01 09:47:33 +02:00
wmayer
2ea6bc17b6 Fix various compiler warnings:
* fix -Wunused-parameter
* fix -Wunused-function
* fix -Wunused-private-field
* fix -Wunused-variable
* fix -Winconsistent-missing-override
2024-04-30 16:59:31 +02:00
Martin Rodriguez Reboredo
221ae53dbe Gui: TypeInitStruct for Shiboken6 builds 2024-04-29 16:08:07 -04:00
liukaiwen
8e5213efd8 fix precompile on lastest unified measurement 2024-04-29 13:42:40 -05:00
sliptonic
3f46f1f8cc Merge pull request #13650 from chennes/firstStartWidget
Start: First start widget
2024-04-29 11:42:50 -05:00
WandererFan
dd09bd2b53 Merge pull request #9750 from hlorus/gsoc2023_measure
GSoC 2023: Unified Measurement Facility
2024-04-29 12:41:54 -04:00
WandererFan
d4270d2275 Merge pull request #13644 from wwmayer/default_material
Gui: expose ViewProviderGeometryObject::getUserDefinedMaterial() to Python
2024-04-29 12:28:25 -04:00
Roy-043
743f2ac41b Gui: DlgSettingsNavigation.ui fix misalignment of Corner label 2024-04-29 11:26:11 -05:00
MisterMaker
393a4b71f3 Overlay fix for default windows style and other light theme's. (#12573)
* Removing white spaces

* Fixes made by Kadet

I am cleaning up my previous PR because of the white space removal.
I now make a single commit with the white space stuff and one with Kadet fixes.

Co-Authored-By: Kacper Donat <kacper@kadet.net>

* Delete CMakeSettings.json

screwed it up

* added stylesheet for example code.

* added example to cmakelist

* Mouse over fix

This fixes the mouse over issue!

Co-Authored-By: Bas Ruigrok <14298143+Rexbas@users.noreply.github.com>

* Added more overlay stylesheet for all options

* Removed reddudant code!

* Fixed the code

Works great!

Co-Authored-By: Bas Ruigrok <14298143+Rexbas@users.noreply.github.com>

---------

Co-authored-by: Kacper Donat <kacper@kadet.net>
Co-authored-by: Bas Ruigrok <14298143+Rexbas@users.noreply.github.com>
2024-04-29 11:24:33 -05:00
sliptonic
5cd62247fa Merge pull request #13666 from Roy-043/Gui-Clarify-cache-directory-as-read-only-in-prefs,-add-Browse-tooltip
Gui: Clarify cache directory as read-only in prefs, add Browse tooltip
2024-04-29 11:14:59 -05:00
Chris Hennes
f07a4fe074 Merge pull request #13665 from wwmayer/fix_memory_leak2
Core: fix possible memory leaks when using parser
2024-04-29 11:14:11 -05:00
PaddleStroke
2267aa761b Core: TabBar: fix issue following #13508 2024-04-29 10:55:44 -05:00
Max
fd360e8fe9 Update context menu with a toggle for suppress property with checkmark (checked when suppressed) 2024-04-29 17:35:14 +02:00
wandererfan
722fab240e [Measure] Change icon
Co-Authored-By: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2024-04-29 09:27:22 -04:00