]> git.mxchange.org Git - flightgear.git/commitdiff
allow to not only set a general widget <color>, but also specific element
authormfranz <mfranz>
Fri, 14 Apr 2006 10:17:09 +0000 (10:17 +0000)
committermfranz <mfranz>
Fri, 14 Apr 2006 10:17:09 +0000 (10:17 +0000)
colors:  <color-{{back,fore}ground,highlight,label,legend,misc,editfield}>
<input-misc>, for example, sets the input field cursor color, <input-legend>
the input field text color. (This feature was always planned as part of the
'theming' capabilities, and most code is already in place. Only this line
was apparently fogotten. :-)

src/GUI/dialog.cxx

index 30c3004036330e120371c2cebb8d21d2d289ec54..b248fc9363f926605cfc1cb488fdaa3e0059609e 100644 (file)
@@ -841,6 +841,8 @@ FGDialog::setColor(puObject * object, SGPropertyNode * props, int which)
         if ((pucol[i].mask == LABEL) && !c->isValid())
             dirty |= c->merge(_gui->getColor("label"));
 
+        dirty |= c->merge(props->getNode(pucol[i].cname));
+
         if (c->isValid() && dirty)
             object->setColor(pucol[i].id, c->red(), c->green(), c->blue(), c->alpha());
     }