- 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.
- 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
- 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
- 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
- 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"
* 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()
* 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()
* 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
from commit f70329390c since the intended fix is not universal for all cube sizes, therefore leave the old pen width as compromise that obviously worked well
(as strange as it is, restarting FC brings me everytime a different border width)
- this is almost #6848 plus some changes suggested by @Jolbas in #6839 to get rid of some magic numbers
changes to:
- the default border width of 1.5 looked clumsy, therefore reduced to 1.1
- fix pen for SHAPE_CORNER (still not optimal, see comment in #6839)
SO's auto rotation has its own rotation logic that ends at fixed positions. This collides with the "to nearest" option whose aim is to rotate to the next sensible state taking into account from what position the rotation was started.
Thus the solution is to disable SO's auto rotation while the cube is rotated.
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
By default navigation cube text now has more weight and CS axes are slightly shifted. A few additional parameters have been added, for being able to customize navigation cube offset, colors, font and visibility of CS. Parameters are consolidated under NaviCube group. Customization front-end, making use of this new parameters, will be added to CubeMenu module in the following days:
https://forum.freecadweb.org/viewtopic.php?f=34&t=43338