# HG changeset patch # User Rik # Date 1588002336 25200 # Node ID be4a6f33d14238dd39d165e25af89eff58ebe2fe # Parent aee0f20c802997eb4d5f8f4b7d70e491a25aea6b Implement "gray" when uicontrol text/slider are disabled (bug #57128). * BaseControl.cc (updatePalette): Call setColor() with additional argument of "QPalette::Active" and again with "QPalette::Inactive" so that colors are set only for specific roles. diff -r aee0f20c8029 -r be4a6f33d142 libgui/graphics/BaseControl.cc --- a/libgui/graphics/BaseControl.cc Sun Apr 26 18:15:30 2020 -0700 +++ b/libgui/graphics/BaseControl.cc Mon Apr 27 08:45:36 2020 -0700 @@ -96,9 +96,13 @@ } else { - p.setColor (QPalette::Window, + p.setColor (QPalette::Active, QPalette::Window, + Utils::fromRgb (props.get_backgroundcolor_rgb ())); + p.setColor (QPalette::Inactive, QPalette::Window, Utils::fromRgb (props.get_backgroundcolor_rgb ())); - p.setColor (QPalette::WindowText, + p.setColor (QPalette::Active, QPalette::WindowText, + Utils::fromRgb (props.get_foregroundcolor_rgb ())); + p.setColor (QPalette::Inactive, QPalette::WindowText, Utils::fromRgb (props.get_foregroundcolor_rgb ())); }