Commit Graph

19 Commits

Author SHA1 Message Date
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
Kacper Donat
bb52790710 Gui: Add ability to set coordinate system axis letter color
Fixes: #12172
2024-02-12 18:07:02 +01:00
Bas Ruigrok
ea8b5b4b39 Gui: Add a separate checkbox for enabling spinning animations (#11534)
* Gui: Create group box for animation preferences

* Gui: Add spinning animation checkbox

* Gui: Implement isAnimating() for NavigationAnimator

* Gui: No need to enable animations in DemoMode

The spin animation is played regardless of the user preference and does not need to be enabled before starting the spin animation

* Gui: Change comment
2023-12-04 10:50:29 -06:00
Rexbas
0441ea10fc Gui: Refactor navigation animations
- Animations are played through an Animator
- Standard animations have a fixed duration and inherit from QVariantAnimation
- The animation duration can be changed in the preferences
- Fix animations when using the two arrows above the NaviCube
- Start an animation or start and wait for an animation
- Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation
- Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation
- Replace OpenInventor navigation style infinite spin animation with SpinningAnimation
- Stops an active animation when a new animation is started
- Stops an active animation when the user starts dragging, panning or zooming
- Refactor reorientCamera so it can be used in animations
- Enable animations by default
2023-10-25 11:17:55 +02:00
wmayer
e0d624bc66 Gui: rename methods setBacklight() & isBacklight() to harmonize with setHeadlightEnabled() & isHeadlightEnabled() 2023-10-24 13:30:40 +02:00
wmayer
9708f00157 Gui: fixes issue #11113: Adjust Default Main Light Position 2023-10-23 11:05:21 -05:00
Yorik van Havre
f1fb45960d Revert "Gui: Refactor navigation animations" 2023-09-26 19:44:16 +02:00
Rexbas
dc216cde2a Gui: Refactor navigation animations
- Animations are played through an Animator
- Standard animations have a fixed duration and inherit from QVariantAnimation
- The animation duration can be changed in the preferences
- Fix animations when using the two arrows above the NaviCube
- Start an animation or start and wait for an animation
- Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation
- Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation
- Replace OpenInventor navigation style infinite spin animation with SpinningAnimation
- Stops an active animation when a new animation is started
- Stops an active animation when the user starts dragging, panning or zooming
- Refactor reorientCamera so it can be used in animations
- Enable animations by default
2023-09-04 21:43:41 +02:00
wmayer
7a3106d31b modernize C++: use bool literals 2023-08-06 01:35:39 +02:00
Jolbas
26a3249107 Navicube OffsetX and OffsetY fix
The navigation cube didn't load parameters OffsetX and OffsetY on creation of a new 3D view. See https://forum.freecad.org/viewtopic.php?p=686678#p686678
2023-06-08 14:08:25 -04: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
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
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
wmayer
d6190cb79c Gui: add enum types to handle background gradients
This fixes some API flaws where booleans were used to distinguish between three different types
2023-04-04 18:44:27 +02:00
wmayer
2845cd55a0 Gui: extend class View3DSettings so that it can be used for AbstractSplitView
AbstractSplitView then no longer needs to be derived from ParameterGrp::ObserverType and reimplement onChange() and thus removes a lot of code duplication
2023-04-04 18:44:27 +02:00
wmayer
2b8784a1b6 Gui: by default radial gradient is off 2023-04-04 14:51:41 +02:00
xtemp09
414c803ff3 [GUI] Radial gradient implementation
This commit implements radial gradient as background and adds the option
to settings. It also renames "Color gradient" as "Linear gradient",
keeping Linear gradient default. Internally, it remains unchanged for
compatibility.

Radio gradient is more suitable for CAD, since it gives a more balanced
color distribution across the screen, improving visibility of model and
sketches with a halo-like effect.
2023-04-02 16:33:01 +07:00
wmayer
a16073c91d Gui: add function View3DSettings::stopAnimatingIfDeactivated() 2023-02-26 16:20:58 +01:00
wmayer
64ce9ec0a4 Gui: refactor View3DInventor and move handling of settings to separate classes 2023-02-26 15:17:39 +01:00