obelisk79 / OpenTheme

Home of the OpenTheme system for FreeCAD
GNU Lesser General Public License v2.1
36 stars 8 forks source link

Enable/Disabled distinctions in DarkTheme #115

Closed JohnAD closed 3 months ago

JohnAD commented 3 months ago

For the input and label elements commonly used with forms, visually distinguishing enabled vs disabled state would be very useful.

To give an example, I added all those items to a dialog:

opendark

The enabled items are on the left. The same items disabled are on the right.

For comparison, the same dialog with no theme added:

no-theme

JohnAD commented 3 months ago

Here is the code I used to test this. It's a tiny standalone Python app with the theme cut & pasted and the dialog in a .ui file.

I also see it in the FreeCAD proper, but FreeCAD probably is doing other stuff with the theming, so I doubt it exactly matches. So, this example is really only for showing the disabled formatting.

themeText.zip

obelisk79 commented 3 months ago

PlainTextEdit and TextLabel don't appear to be used in FreeCAD anywhere and aren't even defined in my stylesheet. I can add them if you need to use them, but there should be comparable alternative widgets to use instead.

JohnAD commented 3 months ago

Oh, for the file main.py you will want to uncomment lines 10 to 12 to turn on the theme.

JohnAD commented 3 months ago

TextLabel == QLabel . I should have used different text on that one.

obelisk79 commented 3 months ago

fixed https://github.com/obelisk79/OpenTheme/pull/116

JohnAD commented 3 months ago

looks great! thanks.

image