UIDefaultsLoader: do not detect string values that start and end with '"', but also contain ", as string (e.g. font value "Roboto Mono", "Ubuntu Mono")

This commit is contained in:
Karl Tauber
2021-10-10 17:59:00 +02:00
parent 1192bef1ae
commit ac46632e73

View File

@@ -410,7 +410,7 @@ class UIDefaultsLoader
// check whether value type is specified in the value
if( value.startsWith( "#" ) )
valueType = ValueType.COLOR;
else if( value.startsWith( "\"" ) && value.endsWith( "\"" ) ) {
else if( value.startsWith( "\"" ) && value.indexOf( '"', 1 ) == value.length() - 1 ) {
valueType = ValueType.STRING;
value = value.substring( 1, value.length() - 1 );
} else if( value.startsWith( TYPE_PREFIX ) ) {