Mercurial > octave
changeset 28249:be4a6f33d142
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.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 27 Apr 2020 08:45:36 -0700 |
parents | aee0f20c8029 |
children | afc53bd3d71b |
files | libgui/graphics/BaseControl.cc |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 ())); }