Commit Graph

23 Commits

Author SHA1 Message Date
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
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
ef63a35e0f Gui: fix -Wclazy-connect-by-name 2023-04-05 16:23:15 +02:00
Uwe
22db01d7a9 [Gui] NaviCube: don't write font size on loading preferences
- as discussed here: https://github.com/FreeCAD/FreeCAD/pull/8567#issuecomment-1445283127 and following)
2023-03-08 17:18:59 +01:00
Uwe
4adf98e369 [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
b15391752e Fix NaviCube default font incorrect display in pref. page 2023-02-25 00:00:56 +01:00
Uwe
9bc526c076 [Gui] attempt to fix getting NaviCube font name
- as discussed here: https://forum.freecad.org/viewtopic.php?t=76233 maybe the conversion to ".toLatin1()" is unsafe on some systems for non-ASCII characters on the font names
2023-02-24 16:58:38 +01:00
Uwe
ef29cc7657 [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
961bef36c0 Gui: fix regression that NaviCube cannot be switched off any more 2023-02-07 22:16:09 +01:00
wmayer
39502e8c57 Gui: recreate NaviCubes of all 3D views 2023-02-07 22:16:09 +01:00
wmayer
e50dd7d2d2 Gui: remove Q_SLOTS decorator and use connect() to bind the signal 2023-02-07 22:16:09 +01:00
Uwe
8801836321 [Gui] modernize some UI connections 2023-01-30 18:11:37 -07:00
Uwe
588f2d50e4 [Gui] allow to specify font for NaviCube
- the problem is that depending on the OS, the font of the NaviCube is hardly readable. For example under Windows 11, there is no Helvetica font and therefore an ugly replacement font is used. On some laptop screens the font is too large or too small etc.
- as solution this PR add the change the NaviCube's font and font size

- the PR also fixes an issue that the position (corner) of the NaviCube was not respected when the NaviCube is recreated. This fix is necessary for the PR therefore included

- as by-product the PR fixes #8082 since every change in the preferences now properly recreates the NaviCube

- the PR also removes the strange and unused class "HuuhaaClassPy"
2023-01-27 02:23:46 +01:00
berniev
75acacd1b7 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
Uwe
1b5285bebd [Gui] move a NaviCube parameter to the NaviCube parameter group
- at the moment some NaviCube parameters are in the general View group, some in the dedicated NaviCube group
2022-07-30 00:50:12 +02:00
Uwe
7196e8976c [Gui] DlgSettings etc.: remove unused includes 2022-03-17 00:17:32 +01:00
luz paz
8ebd5c6eac Gui: Make DlgSettingsNavigation methods conform to naming standard
Renamed `CheckBox_UseAutoRotation` to `checkBoxUseAutoRotation` to match the preexisting naming syntax
2021-09-12 10:54:40 -04:00
donovaly
e58ee299d4 [Gui] improving NaviCube
fixes bug 4495

- add missing edge faces
- implement a proper rotation recipe -> rotate towards the nearest possible state
- add preferences settings to turn off this new rotation behavior
- get rid of transparent cube faces to avoid wrong clicks, this way also remove the backfaces
- to make the edge faces fit, use triangles for the corners
- expose cube size setting to preferences dialog
- add new button to view backside
- get rid of bitmaps because as reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=52118&start=20#p481781
the x y z labels are not scaled on HiDPI screens
moreover they are often "in they way" when you want to click on a corner and in principle they don't provide more info since we already have the CS with the axis labels

- also fix an arithmetic overflow compiler warning
- also rename 2 variables
2021-03-29 17:11:34 +02:00
Benjamin Nauck
7ba93c9e32 Gui: Add setting for changing size of navigation cube
It's already possible to change size of the navigation cube through the
parameters. This just adds a GUI option in the preferences window.
2021-03-09 17:14:04 +01:00
wmayer
5e83aa8848 Gui: [skip ci] in user settings offer combo box to choose between rotation modes 2020-11-28 22:12:25 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
5d99fcb119 Gui: remove moved controls from 3D view settings page 2020-03-15 14:00:04 +01:00
wmayer
1601766af6 Gui: [skip ci] split 3D view settings into two pages 2020-03-15 12:32:07 +01:00