Navigation Cube color settings

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Jolbas
Posts: 327
Joined: Sat Mar 26, 2022 7:48 am
Location: Sweden

Navigation Cube color settings

Post by Jolbas »

I'm working on the Navigation Cube and I have added borders to the buttons that is equal to the edges of the cube. The motivation is that the buttons sometimes disappears depending on the objects behind
Skärmavbild 2023-04-20 kl. 13.10.02.png
Skärmavbild 2023-04-20 kl. 13.10.02.png (47.72 KiB) Viewed 949 times
1. Is there something against such change?
2. Would it be ok to merge the settings for ButtonColor and FrontColor into one BaseColor?
3. Would it be ok to merge the settings for TextColor and BorderColor into one Emphase Color?

In my current implementation there is GUI only for the ButtonColor and the TextColor and BorderColor defaults to white or black whichever gives the most contrast.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Navigation Cube color settings

Post by adrianinsaval »

looks like a good idea to me, I don't really see a point in offering such fine control of colors, specially when it's only through advanced parameters. It could however be a good idea to make the borders optional to provide a workaround for this issue: viewtopic.php?t=76438
(which I suspect would be extended to the buttons too with your changes)
@-alex- do you still experience this issue with the navicube in a raspberry pi?
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Navigation Cube color settings

Post by chennes »

That all sounds fine to me as well.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Jolbas
Posts: 327
Joined: Sat Mar 26, 2022 7:48 am
Location: Sweden

Re: Navigation Cube color settings

Post by Jolbas »

Here's the code if you want to compile and try.
https://github.com/Jolbas/FreeCAD/tree/ ... sable_drag
User avatar
Jolbas
Posts: 327
Joined: Sat Mar 26, 2022 7:48 am
Location: Sweden

Re: Navigation Cube color settings

Post by Jolbas »

@-alex- The code is now updated to use glDrawArrays() instead of glBegin() and glEnd(). Those two later are not a part of OpenGL ES that is used on your Raspberry Pi and glDrawArrays() is better in any case. If you are able to compile and test my branch that would be great.
User avatar
-alex-
Veteran
Posts: 1857
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Navigation Cube color settings

Post by -alex- »

Thanks guys for your attention to RPI4 plateform.
Jolbas wrote: Fri Apr 21, 2023 7:54 am If you are able to compile and test my branch that would be great.
I'll give it a try ASAP.
Thanks for your efforts.
Post Reply