Commit Graph

98 Commits

Author SHA1 Message Date
Max Wilfinger
898910209d Add Std_AlignToSelevtion to menu and context menu 2024-06-03 10:48:35 -05:00
Martin Rodriguez Reboredo
ccaee18917 Gui: Fix NaviCube for Qt6 2024-05-22 13:57:59 -04:00
PaddleStroke
555d06e875 Navicube : Add missing 'Fit selection' menu entry. 2024-03-18 17:37:40 +01: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
Zheng, Lei
bf9584a90b Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
wmayer
5a81fcd7a5 MSVC: fix warnings and build failure 2023-09-23 19:10:32 +02:00
Rexbas
c2bf9efc7d Gui: Improve accuracy for navigation cube's rotate to nearest feature 2023-09-20 07:37:02 -05:00
wmayer
89bb28239e MSVC: fix several compiler warnings 2023-09-12 22:57:26 +02:00
wmayer
bb23aaf3e9 Core: modernize C++: redundant void arg 2023-08-05 16:50:31 +02:00
Jolbas
832b1919ba Navicube: Fix rotation direction north and south buttons 2023-06-16 07:16:39 +02: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
Rexbas
530dd7c219 Fix typo 2023-05-09 10:31:38 +02:00
Rexbas
9415c80a5e Add method to find the nearest orientation 2023-05-09 10:31:38 +02:00
Rexbas
e09f729400 Cleanup unused NaviCube methods 2023-05-09 10:31:38 +02:00
Rexbas
de2a2f6c6f Apply the rotation that is stored in the NaviCube face 2023-05-09 10:31:38 +02:00
Rexbas
f20a0cceaa Determine rotation direction of NaviCube buttons 2023-05-09 10:31:38 +02:00
Rexbas
86d9ded206 Determine standard orientations of NaviCube faces 2023-05-09 10:31:38 +02: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
35b0ea71f9 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
8f3e7451dd Fix misc. linting and typos
Trim whitespace; move imports to separate lines, fix typos
2023-04-25 17:14:39 +02:00
Jolbas
466fc32211 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
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
Ronny Standtke
37eb3ba229 use toUtf8() instead of toLocal8Bit() 2023-04-13 17:29:12 +02:00
Ronny Standtke
9e46e4a7d1 use tr() instead of QT_TR_NOOP() 2023-04-13 02:27:16 +02:00
Ronny Standtke
69dd7f2949 added i18n for navicube labels 2023-04-12 22:13:58 +02:00
Adrian Insaurralde Avalos
c6c3c54b74 Improve NaviCube font matching on linux 2023-02-28 10:01:33 +01:00
wmayer
3fb943864e Gui: use Color::fromPackedRGBA to simplify client code 2023-02-26 13:30:44 +01:00
Uwe
faca6b2e40 [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
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
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
2ffa1d546f Gui: use QString::fromStdString for std::string 2023-02-07 22:16:09 +01:00
wmayer
d24bb7195a 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
a38b2ffbf7 Fix various trailing newlines, typos and grammar 2023-02-04 18:29:07 +01:00
Uwe
932abebca9 [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
b39e1f2fc8 [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
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
luzpaz
836835074e Navicube: convert indentations to spaces 2023-01-23 16:57:58 +01:00
Uwe
3e58ada046 [skip ci] [Gui] NaviCube: remove tabs
- as detected by the CI
2022-11-29 01:38:34 +01:00
Adrian Insaurralde Avalos
dfaecfa187 [fixes #7875] Gui: use hexagon shape in NaviCube corners
makes the corners bigger and therefore easier to click

fix inconsistent NaviCube borders


Co-authored-by: Rexbas <rexbasie@gmail.com>
2022-11-29 01:31:48 +01:00
Uwe
7869b443db [skip ci] [Gui] NaviCube: fix warning about too short variable name
- also some whitespace unification
2022-11-11 05:16:18 +01:00
Uwe
60d536bdf2 [Gui] NaviCube: fix rotation to backside
- when pressing the "dot" besides the NaviCube, the rotation to the backside was not in the center thus the view jumped
2022-11-11 04:58:20 +01:00
wmayer
09550656c2 Qt6 port:
* Constructor of QFontDatabase is deprecated, use static functions instead
* Fix QuantitySpinBox::selectNumber()
* Fix InputField::selectNumber()
* Make InputField::fixup() compatible with Qt6
* QFont::setWeight requires an enum now
* QInputEvent reuires a pointing device now
* QAbstractItemView::viewOptions() has been renamed to QAbstractItemView::initViewItemOption()
2022-11-03 12:38:11 +01:00
wmayer
ec553a9292 Qt6 port:
* Explicitly include some missing headers
* Use 'static const char*' for XPM icon
* Skip template parameters for qMakePair
* Constructor of QFileInfo is marked as 'explicit' now
* QString::fromLatin1() also accepts a QByteArray
* QDateTime::fromTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::fromSecsSinceEpoch()
* QDateTime::toTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::toSecsSinceEpoch()
* QApplication::globalStrut() is deprecated. Don't use it any more.
* QWidget::isTopLevel() is deprecated, use QWidget::isWindow()
2022-11-02 15:16:41 +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
berniev
a909df7f39 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
Uwe
d1ffbc0ae9 [Gui] [skip CI] NaviCube: fix indentation mistake from previous commit 2022-08-13 15:11:32 +02:00
Uwe
d78d1bbe58 [Gui] fix NaviCube step handling
- as reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=71050
2022-08-13 15:02:26 +02:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
6ac4d8392e Gui: use emplace_back 2022-08-05 10:33:41 +02:00