Commit Graph

96 Commits

Author SHA1 Message Date
PaddleStroke
0012301001 Navicube : Add missing 'Fit selection' menu entry. 2024-03-18 17:37:40 +01:00
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
Zheng, Lei
ba6b2a4375 Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
wmayer
1cdff85086 MSVC: fix warnings and build failure 2023-09-23 19:10:32 +02:00
Rexbas
6a062e95d7 Gui: Improve accuracy for navigation cube's rotate to nearest feature 2023-09-20 07:37:02 -05:00
wmayer
d9d7bf87ae MSVC: fix several compiler warnings 2023-09-12 22:57:26 +02:00
wmayer
702f3b4ddd Core: modernize C++: redundant void arg 2023-08-05 16:50:31 +02:00
Jolbas
a44069fe6f Navicube: Fix rotation direction north and south buttons 2023-06-16 07:16:39 +02: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
Rexbas
15462488ba Fix typo 2023-05-09 10:31:38 +02:00
Rexbas
5b3957b43a Add method to find the nearest orientation 2023-05-09 10:31:38 +02:00
Rexbas
fac1a5b3de Cleanup unused NaviCube methods 2023-05-09 10:31:38 +02:00
Rexbas
dc0f6c9534 Apply the rotation that is stored in the NaviCube face 2023-05-09 10:31:38 +02:00
Rexbas
fed59b3584 Determine rotation direction of NaviCube buttons 2023-05-09 10:31:38 +02:00
Rexbas
e75f0cb247 Determine standard orientations of NaviCube faces 2023-05-09 10:31:38 +02: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
3fd1f4b7da 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
4e2124e1d3 Fix misc. linting and typos
Trim whitespace; move imports to separate lines, fix typos
2023-04-25 17:14:39 +02:00
Jolbas
0c20d6f1a5 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
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
Ronny Standtke
e3d47049bf use toUtf8() instead of toLocal8Bit() 2023-04-13 17:29:12 +02:00
Ronny Standtke
1b20532595 use tr() instead of QT_TR_NOOP() 2023-04-13 02:27:16 +02:00
Ronny Standtke
e6d2f0e852 added i18n for navicube labels 2023-04-12 22:13:58 +02:00
Adrian Insaurralde Avalos
662473b11f Improve NaviCube font matching on linux 2023-02-28 10:01:33 +01:00
wmayer
42e055f9c7 Gui: use Color::fromPackedRGBA to simplify client code 2023-02-26 13:30:44 +01:00
Uwe
edd65a9d3f [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
304e0da9d7 [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
0079352b66 Fix NaviCube default font incorrect display in pref. page 2023-02-25 00:00:56 +01:00
Uwe
9aa61bf49a [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
c0a5c68b7d Gui: use QString::fromStdString for std::string 2023-02-07 22:16:09 +01:00
wmayer
30d2b24cf6 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
1b43baa418 Fix various trailing newlines, typos and grammar 2023-02-04 18:29:07 +01:00
Uwe
c181974e0e [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
ac9d020762 [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
5fdd405a69 [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
a884da5890 Navicube: convert indentations to spaces 2023-01-23 16:57:58 +01:00
Uwe
8f968384f8 [skip ci] [Gui] NaviCube: remove tabs
- as detected by the CI
2022-11-29 01:38:34 +01:00
Adrian Insaurralde Avalos
3db6da540d [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
7a26e69405 [skip ci] [Gui] NaviCube: fix warning about too short variable name
- also some whitespace unification
2022-11-11 05:16:18 +01:00
Uwe
4bade5d96b [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
abc4e6bf39 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
fac648fff5 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
ae53c9b0a4 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
3877fc62c3 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
Uwe
6f3bd9812c [Gui] [skip CI] NaviCube: fix indentation mistake from previous commit 2022-08-13 15:11:32 +02:00
Uwe
3a2c408c8f [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
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
066656f62a Gui: use emplace_back 2022-08-05 10:33:41 +02:00
Uwe
d5b227e6a6 [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
Uwe
a58514b260 [Gui] attempt to improve NaviCube rendering
When the NaviCube is relatively small, it looks clumsy on some screens. This PR tries to improve that.
2022-06-08 01:06:15 +02:00