Commit Graph

16 Commits

Author SHA1 Message Date
Rexbas
37e600e766 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
a8c65ec621 Gui: rename methods setBacklight() & isBacklight() to harmonize with setHeadlightEnabled() & isHeadlightEnabled() 2023-10-24 13:30:40 +02:00
wmayer
f566b449a6 Gui: fixes issue #11113: Adjust Default Main Light Position 2023-10-23 11:05:21 -05:00
Yorik van Havre
ffd66cf826 Revert "Gui: Refactor navigation animations" 2023-09-26 19:44:16 +02:00
Rexbas
9fed764368 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
2a88c7c7df modernize C++: use bool literals 2023-08-06 01:35:39 +02:00
Jolbas
14dd2c60ec 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
caac68472b 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
6f8e3f374f 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
8abd6d0870 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
eb3fd5fe47 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
21b2f97ab0 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
6ac0de86d2 Gui: by default radial gradient is off 2023-04-04 14:51:41 +02:00
xtemp09
81cfe34085 [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
bb1de399ad Gui: add function View3DSettings::stopAnimatingIfDeactivated() 2023-02-26 16:20:58 +01:00
wmayer
94f3a476a9 Gui: refactor View3DInventor and move handling of settings to separate classes 2023-02-26 15:17:39 +01:00