# HG changeset patch # User Rik # Date 1587939111 25200 # Node ID 20794455ea11be8ecda85e2093a5156737d546ce # Parent c387a55aed05eca9b10543603baddda3323741bd Implement "gray" when uicontrol popupmenus are disabled (bug #57128). * BaseControl.cc (updatePalette): For popupmenu type, add ":enabled" to beginning of StyleSheet specification so that custom colors are only applied when widget is active. diff -r c387a55aed05 -r 20794455ea11 libgui/graphics/BaseControl.cc --- a/libgui/graphics/BaseControl.cc Sun Apr 26 15:01:41 2020 -0700 +++ b/libgui/graphics/BaseControl.cc Sun Apr 26 15:11:51 2020 -0700 @@ -65,8 +65,8 @@ // This requires setting colors for both. QColor bcol = Utils::fromRgb (props.get_backgroundcolor_rgb ()); QColor fcol = Utils::fromRgb (props.get_foregroundcolor_rgb ()); - QString qss = QString ("background: %1 none;\n" - "color: %2;") + QString qss = QString (":enabled { background: %1 none;\n" + "color: %2; }") .arg(bcol.name ()).arg (fcol.name ()); w->setStyleSheet(qss); return;