Fix wxColour::GetAsString called for non-solid colour

Don't return RGB values if colour is not solid
and hence cannot be represented with these values.
Non-solid colour should be reported as an unknown
RGB value, e.g. '??????'.

Closes #18596.
This commit is contained in:
Artur Wieczorek
2019-11-24 18:51:29 +01:00
parent fee30940b6
commit 7b86958b25
2 changed files with 47 additions and 30 deletions

View File

@@ -118,6 +118,9 @@ public:
@c wxC2S_CSS_SYNTAX (which is the only one supporting alpha) is not
specified in flags.
@note For non-solid (i.e. non-RGB) colour this function returns
"rgb(??, ?? ??)" or "#??????".
@since 2.7.0
*/
virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;