NaviCube: improved style
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: NaviCube: improved style
we could use a short version for labels:
TOP
BTM
FRNT
REAR
LFT
RX
SX
Still there is a need to add an uniform letter-spacing.
TOP
BTM
FRNT
REAR
LFT
RX
SX
Still there is a need to add an uniform letter-spacing.
Re: NaviCube: improved style
The culprit of the bad look is this line:
When commenting it out the text looks much better.
Code: Select all
sansFont.setStretch(QFont::ExtraCondensed);
Re: NaviCube: improved style
@wmayer: Thanks for your finding. Interesting... maybe its some kind of bug in Qt for Windows? Does the bottom layer label still fit within the face boundaries when it's commented out?wmayer wrote: ↑Mon Apr 15, 2019 9:01 am The culprit of the bad look is this line:When commenting it out the text looks much better.Code: Select all
sansFont.setStretch(QFont::ExtraCondensed);
With this offending line I could squeeze in a larger font on a face while making the cube smaller and still keep the same readability level. But with this being broken on Windows we shouldn't merge this PR for sure! Thanks again for verifying this.
I might try the Windows build next time before making a pull request, but I don't have the toolchain set up on Windows yet. I won't be able to verify the macOS build though - not a mac owner.
[EDIT]
Since the PR was already merged, I did a fix on top of the current master branch to mitigate the character spacing error on Windows. Font size is now soft-constrained - has an upper limit to not overflow Cube's face. It's applied individually on each face only if it overflows due to the font size being to big. Currently it only makes the bottom face use slightly smaller font, while other faces are consistent in using slightly larger one - seems like a good compromise to me.
It's this branch: https://github.com/tyszja/FreeCAD/tree/naviCube_improve. But I still have to build it against Windows to verify.
BTW: I've did some work to make the Cube configurable, but it's still to early to post anything.
Last edited by tyszja on Mon Apr 22, 2019 11:05 am, edited 1 time in total.
Re: NaviCube: improved style
Cube could use one-letter labels with some renaming. One possibility is
- D dexter (Right)
S sinister (Left)
B bottom
T top
R rear
F front
- R right
L left
U underside
T top
B back
F front
Re: NaviCube: improved style
Possible. At least with Qt4.8 it looks good and there is no change required. With Qt5.6 or Qt5.12 the change is required.Thanks for your finding. Interesting... maybe its some kind of bug in Qt for Windows?
It's clearly outside of the cube's face. The letters "B" and "m" lie on the rounded edges of the cube.Does the bottom layer label still fit within the face boundaries when it's commented out?
I guess this has something to do that in Qt5.x the whole OpenGL support has been reworked. I remember that in the old QGLWidget class there was a method to paint text and with the workarounds for Qt5 the text looks really ugly.
For the Image module I once found a nice solution based on QPainterPath and the rendered text looks nice. See GLImageBox::renderText. Maybe the same idea (at least for Qt5 on Windows) could be applied on the NaviCube.
I once had the situation that text painted on a GL canvas was truncated and after upgrading the graphic driver the issue was gone. So, it's possible that on your system it might look good but then on another computer it doesn't.With this offending line I could squeeze in a larger font on a face while making the cube smaller and still keep the same readability level. But with this being broken on Windows we shouldn't merge this PR for sure! Thanks again for verifying this.
I might try the Windows build next time before making a pull request, but I don't have the toolchain set up on Windows yet. I won't be able to verify the macOS build though - not a mac owner.
Re: NaviCube: improved style
Thanks. I'll see once I have all the build tools and libs set up on Windows. In the mean time I did a quick fix here: https://github.com/tyszja/FreeCAD/tree/naviCube_improve It removes the Condensed parameter and applies an upper size limit to a label only when it's to large to fit... this should now only affect the bottom face. As a result the bottom face should now use a slightly smaller font size than all the other use - it slightly breaks the consistency on this single face but shouldn't hurt your eyes too much.wmayer wrote: ↑Mon Apr 22, 2019 10:56 amPossible. At least with Qt4.8 it looks good and there is no change required. With Qt5.6 or Qt5.12 the change is required.Thanks for your finding. Interesting... maybe its some kind of bug in Qt for Windows?It's clearly outside of the cube's face. The letters "B" and "m" lie on the rounded edges of the cube.Does the bottom layer label still fit within the face boundaries when it's commented out?
I guess this has something to do that in Qt5.x the whole OpenGL support has been reworked. I remember that in the old QGLWidget class there was a method to paint text and with the workarounds for Qt5 the text looks really ugly.
For the Image module I once found a nice solution based on QPainterPath and the rendered text looks nice. See GLImageBox::renderText. Maybe the same idea (at least for Qt5 on Windows) could be applied on the NaviCube.
I once had the situation that text painted on a GL canvas was truncated and after upgrading the graphic driver the issue was gone. So, it's possible that on your system it might look good but then on another computer it doesn't.With this offending line I could squeeze in a larger font on a face while making the cube smaller and still keep the same readability level. But with this being broken on Windows we shouldn't merge this PR for sure! Thanks again for verifying this.
I might try the Windows build next time before making a pull request, but I don't have the toolchain set up on Windows yet. I won't be able to verify the macOS build though - not a mac owner.
Re: NaviCube: improved style
Hi,
If anyone cares, my NaviCube related branch has been updated with the configurable opacity, scale and position lock preferences (and hopefully fixed the unreadable text on Windows+Qt5).
The bad news is that I've probably messed up some translations as I couldn't just simply throw another few option widgets into this already mixed bag of options in the '3D View' section - so I did some spring cleaning there (It's a separate commit though thus can be skipped If anyone cares to pull without the cleanup).
Oh, the branch is here: https://github.com/tyszja/FreeCAD/tree/naviCube_improve
New and old look comparison attached. Left is the new one.
If anyone cares, my NaviCube related branch has been updated with the configurable opacity, scale and position lock preferences (and hopefully fixed the unreadable text on Windows+Qt5).
The bad news is that I've probably messed up some translations as I couldn't just simply throw another few option widgets into this already mixed bag of options in the '3D View' section - so I did some spring cleaning there (It's a separate commit though thus can be skipped If anyone cares to pull without the cleanup).
Oh, the branch is here: https://github.com/tyszja/FreeCAD/tree/naviCube_improve
New and old look comparison attached. Left is the new one.
- Attachments
-
- preferences comparison
- Zrzut ekranu z 2019-04-28 08-27-44.png (336.47 KiB) Viewed 2063 times
Re: NaviCube: improved style
Please put all NaviCube settings into its own tab. The current 3D view page is already a bit overloaded and there shouldn't be added more widgets. Keep in mind that there are users with relative small displays and when a page has too many controls then it affects usability (if things work correctly then a scrollbar is shown, if not then the page is truncated).New and old look comparison attached. Left is the new one
Re: NaviCube: improved style
Right... When I looked at the current state of the 3D View tab with all these widgets mixed up with no sense I thought that no one thinks about the usability. Good I was wrong. I got your point, thanks.
Re: NaviCube: improved style
seven labels for six faces?
Why not use N, E, S, W, T, B?
Code: Select all
# North
#
# +-----------+
# / /|
# / Top / |
# / / |
# / / |
# +-----------+ |
# | | +
# | | / East
# West | South | /
# | | /
# | |/
# +-----------+
# z
# ^ Bottom
# | y
# | /
# |/
# +------> x