Commit Graph

35 Commits

Author SHA1 Message Date
Kacper Donat
caab5fba78 Gui: Fix saving light sources 2025-03-29 14:14:04 -05:00
Benjamin Nauck
6a226c9469 Gui: Workaround for lighting issue 2025-03-05 20:29:10 +01:00
Benjamin Nauck
7a5ae8bd5c Gui: Create light sources parameter group
* categorizes light sources into its own group
* fixes config file issues between 1.0 and 1.1
2025-03-04 21:06:17 +01:00
Chris Hennes
7f1c43a335 Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Kacper Donat
2f35f1c561 Base: Add fromPercent and toPercent helpers 2025-02-23 22:51:13 +01:00
Kacper Donat
7f984811e8 Gui: Add 3 point lighting 2025-02-23 22:51:13 +01:00
Kacper Donat
a72a63232a 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
aa76a63abf Merge pull request #19420 from tritao/gui-selection-refactor
Gui: Selection code cleanups
2025-02-10 10:56:23 -06:00
tritao
48f0f07176 Gui: Reorganize the navigation files into a top Navigation folder. 2025-02-05 20:21:00 -06:00
tritao
0f675bb635 Gui: Rename SoFCEnableHighlightAction to preselection terminology. 2025-02-05 13:14:00 +00:00
Benjamin Bræstrup Sayoc
15157ad48c [Gui] Make axis colors of corner axis changeable 2025-01-24 15:45:43 +01:00
Benjamin Bræstrup Sayoc
ce35c95e18 [Gui] Make axis colors of axis kit (world origin axis) changeable 2025-01-24 15:45:42 +01:00
Benjamin Bræstrup Sayoc
084e43c160 [Gui] Make NaviCube axis colors changeable 2025-01-24 15:45:42 +01:00
Joao Matos
318e6f7158 Gui: Avoid unnecessary exception in View3DSettings::OnChange.
This gets caught in the debugger at startup, in this case its easy to
avoid it.
2025-01-17 12:28:50 -06:00
Max Wilfinger
5c7d287f6b Changes override draw style when entering sketch edit mode. 2024-05-30 11:17:35 +02:00
Syres916
e7c11a01be [Sketcher] Change HeadlightIntensity entering and exiting Edit Mode (#14013)
* [Sketcher] Change HeadlightIntensity entering and exiting Edit Mode

* [Gui] Fix Lint Warning

* [Sketcher] Fix Lint Warning

* [Sketcher] Remove duplicate parameter check

* [Gui] Add const
2024-05-27 11:27:11 -05:00
LemonBoy
fc6d4b6d0f 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
e40131d4b8 Gui: Add ability to set coordinate system axis letter color
Fixes: #12172
2024-02-12 18:07:02 +01:00
Bas Ruigrok
9e2577bce7 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
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