Custom properties look bad on dark themes

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
adrianinsaval
Veteran
Posts: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Custom properties look bad on dark themes

Post by adrianinsaval »

Hi, custom properties look bad and are hard to read whe using a dark theme. I'm not sure where in the code this can be adressed.
Anotación 2019-11-07 194817.png
Anotación 2019-11-07 194817.png (3.39 KiB) Viewed 1802 times
Steps to reproduce:
Click on any object -> right clik in property tab -> show all-> right clik in a property -> add property

Also, the option to add property is not shown until you tick the 'show all' option, is this the intended behavior?
DeepSOIC wrote: Fri Aug 23, 2019 8:34 pm Also a new thing: dynamic properties, addable through property editor.
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18640 (Git)
Build type: Release
Branch: master
Hash: 2251f53eb5af097cbb4b879af89575132660e541
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Spanish/Paraguay (es_PY)
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Custom properties look bad on dark themes

Post by DeepSOIC »

adrianinsaval wrote: Thu Nov 07, 2019 11:06 pm Also, the option to add property is not shown until you tick the 'show all' option, is this the intended behavior?
I don't know. Possibly.
User avatar
adrianinsaval
Veteran
Posts: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Re: Custom properties look bad on dark themes

Post by adrianinsaval »

DeepSOIC wrote: Fri Nov 08, 2019 12:08 am
adrianinsaval wrote: Thu Nov 07, 2019 11:06 pm Also, the option to add property is not shown until you tick the 'show all' option, is this the intended behavior?
I don't know. Possibly.
sorry, since you posted it I thougth you developed it but it seems it was realthunder?
realthunder wrote: ping
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Custom properties look bad on dark themes

Post by realthunder »

adrianinsaval wrote: Thu Nov 07, 2019 11:06 pm Hi, custom properties look bad and are hard to read whe using a dark theme. I'm not sure where in the code this can be adressed.
I am not sure how to solve this either. Anyone familiar with Qt stylesheet? BTW, the yellow background is only shown if you enable 'Show all', just to give the user a visual feedback on which property is dynamic and can be removed. Removing a dynamic property may have consequences, so I consider this as advanced operation, and therefore hidden unless you 'Show all'. For the same reason, you are not supposed to turn on 'Show all' all the time.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Custom properties look bad on dark themes

Post by realthunder »

I've submit a PR to force black text color when showing yellow background.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
adrianinsaval
Veteran
Posts: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Re: Custom properties look bad on dark themes

Post by adrianinsaval »

realthunder wrote: Fri Nov 08, 2019 2:46 am I've submit a PR to force black text color when showing yellow background.
Thanks!
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Custom properties look bad on dark themes

Post by pablogil »

I'm the Qt stylesheets developer, it would be easy to fix if this custom property gets an ID so that I can access it via Qt styling but as I guess, the yellowish background color is hardcoded.
It's necessary that it is applied this ID (or class) to the custom property element so that I can create the correct style inside the stylesheet (text color and background, both following the global style, of course).

Cheers
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Custom properties look bad on dark themes

Post by realthunder »

pablogil wrote: Wed Nov 13, 2019 7:51 am I'm the Qt stylesheets developer, it would be easy to fix if this custom property gets an ID so that I can access it via Qt styling but as I guess, the yellowish background color is hardcoded.
It's necessary that it is applied this ID (or class) to the custom property element so that I can create the correct style inside the stylesheet (text color and background, both following the global style, of course).

Cheers
How to set the ID for a property item? I know it's easy to set name for any QObject, but how to do that for an item within a QTreeView? Or, is there any way to define some named color in the stylesheet, so I can somehow retrieve it programmatically?
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Custom properties look bad on dark themes

Post by vocx »

realthunder wrote: Fri Nov 15, 2019 10:34 am How to set the ID for a property item? I know it's easy to set name for any QObject, but how to do that for an item within a QTreeView? Or, is there any way to define some named color in the stylesheet, so I can somehow retrieve it programmatically?
https://doc.qt.io/qt-5/stylesheet-examples.html

It's probably something similar to that. Qt has a ton of options.

See also the other thread Blue on Black.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Custom properties look bad on dark themes

Post by pablogil »

vocx wrote: Fri Nov 15, 2019 7:18 pm
realthunder wrote: Fri Nov 15, 2019 10:34 am How to set the ID for a property item? I know it's easy to set name for any QObject, but how to do that for an item within a QTreeView? Or, is there any way to define some named color in the stylesheet, so I can somehow retrieve it programmatically?
https://doc.qt.io/qt-5/stylesheet-examples.html

It's probably something similar to that. Qt has a ton of options.

See also the other thread Blue on Black.
Yes, the two threads may be solved with the same objectName Qt property that me as designer don't know how to add it into the code. If any of you add them and give me the names you have used I can add the styles inside the stylesheets...
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Post Reply