Commit Graph

112 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
Bas Ruigrok
70d1f02b42 Gui: NaviCube recreate frame buffer if invalid (#22454)
* Gui: NaviCube recreate frame buffer if invalid

* Gui: NaviCube add debug warning if the frame buffer became invalid
2025-07-16 21:43:52 -05:00
Benjamin Nauck
b625e81a3e Gui: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
Tim Ringenbach
98dca9fede Gui: HiDPI NaviCube fix 2025-03-04 12:29:38 -06:00
Chris Hennes
1a2070c36f Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Joao Matos
80d4cf9f40 Gui: Remove QtOpenGL.h. 2025-02-25 23:03:51 +00:00
Joao Matos
c3e5069190 Gui: Cleanup Qt OpenGL usings in QtOpenGL.h.
Previously the code defined compatiblity usings in `QtOpenGL.h` header,
which I think was added for backwards compatiblity with previous Qt
OpenGL widgets.

As far as I can tell, this is not necessary anymore, and can be cleaned
up.
2025-02-25 23:03:51 +00:00
Bas Ruigrok
af2135fbe2 Gui: Accumulate orientation for NaviCube flat button animations 2025-02-21 21:57:00 +01:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Chris Hennes
5766974067 Merge pull request #16995 from benj5378/axisColors
[Gui] Axis colors changeable
2025-02-03 18:11:46 +01:00
Benjamin Nauck
6f535f19fb Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
Benjamin Bræstrup Sayoc
f4f902e4a3 [Gui] Make NaviCube axis colors changeable 2025-01-24 15:45:42 +01:00
Max Wilfinger
d960f12c25 Add Std_AlignToSelevtion to menu and context menu 2024-06-03 10:48:35 -05:00
Martin Rodriguez Reboredo
831035b72e Gui: Fix NaviCube for Qt6 2024-05-22 13:57:59 -04:00
PaddleStroke
0012301001 Navicube : Add missing 'Fit selection' menu entry. 2024-03-18 17:37:40 +01:00
LemonBoy
8fc02829f1 Dim the Navigation Cube when not active
Implement the InactiveOpacity option, allowing the user to dim the
navigation cube when not focused by making it transparent.
2024-02-12 18:10:12 +01:00
Zheng, Lei
ba6b2a4375 Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
wmayer
1cdff85086 MSVC: fix warnings and build failure 2023-09-23 19:10:32 +02:00
Rexbas
6a062e95d7 Gui: Improve accuracy for navigation cube's rotate to nearest feature 2023-09-20 07:37:02 -05:00
wmayer
d9d7bf87ae MSVC: fix several compiler warnings 2023-09-12 22:57:26 +02:00
wmayer
702f3b4ddd Core: modernize C++: redundant void arg 2023-08-05 16:50:31 +02:00
Jolbas
a44069fe6f Navicube: Fix rotation direction north and south buttons 2023-06-16 07:16:39 +02:00
Jolbas
f973f6b3f9 Improved font handling Navigation cube
Also adding anisotropy texture mapping for better readability on steep angles.
2023-06-06 22:59:20 -04:00
Rexbas
15462488ba Fix typo 2023-05-09 10:31:38 +02:00
Rexbas
5b3957b43a Add method to find the nearest orientation 2023-05-09 10:31:38 +02:00
Rexbas
fac1a5b3de Cleanup unused NaviCube methods 2023-05-09 10:31:38 +02:00
Rexbas
dc0f6c9534 Apply the rotation that is stored in the NaviCube face 2023-05-09 10:31:38 +02:00
Rexbas
fed59b3584 Determine rotation direction of NaviCube buttons 2023-05-09 10:31:38 +02:00
Rexbas
e75f0cb247 Determine standard orientations of NaviCube faces 2023-05-09 10:31:38 +02:00
wmayer
478b5e0628 Gui: fix NaviCube in split views (fixes #9500)
* initialize base and hilite color with more sensible default values
* handle case if no font name is set
* apply user preferences to NaviCube
2023-05-08 10:05:01 +02:00
Jolbas
3fd1f4b7da Compability with OpenGL ES
Replace glPolygonMode() and GL_POLYGON with GL_LINE_LOOP
Replace glDepthRange() with glPolygonOffset()
Some cleanup in configuring openGL
2023-05-04 17:38:48 -04:00
luzpaz
4e2124e1d3 Fix misc. linting and typos
Trim whitespace; move imports to separate lines, fix typos
2023-04-25 17:14:39 +02:00
Jolbas
0c20d6f1a5 NavCube adjustment
Use enum class and fine change to camel case.
Tuned label positions to make one letter labels align better
2023-04-24 12:59:12 +02:00
Jolbas
b613a4ea27 Refactor Navigation Cube
-Use std commands in menu coming with icons
-Only draggable if activated in menu
-Remove textures except labels and used gl fill instead
-Borders on surrounding buttons
-Fix some openGL issues
-Remove duplicate parameter managment. Kept and improved the one in View3DSettings
-Remove lots of other redundant code
-Replaced FontSize param with FontZoom and enabled auto zoom/size on labels.
-Merged BorderColor and TextColor to single EmphaseColor parameter
-Merged ButtonColor and FrontColor to BaseColor parameter
-Added ChamferSize parameter to control edge and corner size
-Use glDrawArrays() innstead of glBegin() and glEnd()
-Draw butt ends on RGB coordinate system
-Fixe issues where cube switch corner on resize window
2023-04-24 12:19:10 +02:00
Ronny Standtke
e3d47049bf use toUtf8() instead of toLocal8Bit() 2023-04-13 17:29:12 +02:00
Ronny Standtke
1b20532595 use tr() instead of QT_TR_NOOP() 2023-04-13 02:27:16 +02:00
Ronny Standtke
e6d2f0e852 added i18n for navicube labels 2023-04-12 22:13:58 +02:00
Adrian Insaurralde Avalos
662473b11f Improve NaviCube font matching on linux 2023-02-28 10:01:33 +01:00
wmayer
42e055f9c7 Gui: use Color::fromPackedRGBA to simplify client code 2023-02-26 13:30:44 +01:00
Uwe
edd65a9d3f [Gui] fixes for NaviCube parameters
- add missing routines to save default values

- also fix color read in (transparency was read in wrong order)
2023-02-25 18:56:27 +01:00
Uwe
304e0da9d7 [Gui] add UI to change the NaviCube button size
- it was frequently requested and people now even published videos since I documented this hidden feature in the Wiki.
However, for a user it is a nightmare without a UI and users who like a bright background need to change the button color to keep the buttons visible.
2023-02-25 15:28:51 +01:00
Adrian Insaurralde Avalos
0079352b66 Fix NaviCube default font incorrect display in pref. page 2023-02-25 00:00:56 +01:00
Uwe
9aa61bf49a [Gui] font setting fixes for NaviCube
- it turned out that the current check for default font failed because of wrong check for the hinting
- fix bug that when the FontSize is not yet stored in the parameters, the dialog shows a wrong size value
2023-02-16 14:11:54 +01:00
wmayer
c0a5c68b7d Gui: use QString::fromStdString for std::string 2023-02-07 22:16:09 +01:00
wmayer
30d2b24cf6 Gui: move calls of OnChange to separate method
and explicitly call the class' method to fix warning about bypassing virtual dispatch during construction
2023-02-07 22:16:09 +01:00
luzpaz
1b43baa418 Fix various trailing newlines, typos and grammar 2023-02-04 18:29:07 +01:00
Uwe
c181974e0e [Gui] register NaviCube parameters to view
- there is a bug: when deleting any NaviCube parameter in the parameters dialog, the background color suddenly changes
the fix is to register the NaviCube parameters to the view

- the PR also fixes the issue that the default font size was not properly calculated but hardcoded
2023-02-02 19:02:51 +01:00
Uwe
ac9d020762 [Gui] NaviCube: improve default font
- it turned out that DejaVu Sans is not the best font since its letters are wide. Bahnschrift was designed to run narrow and it at least on all Win 10 since 2017. Therefore use this, if possible
2023-01-27 15:44:01 +01:00