UI defaults inspector: filter by colors with alpha and derived colors

This commit is contained in:
Karl Tauber
2021-02-06 01:32:32 +01:00
parent a38cf284dd
commit c6757cc61b
2 changed files with 11 additions and 2 deletions

View File

@@ -446,7 +446,7 @@ public class FlatUIDefaultsInspector
model.setFilter( item -> { model.setFilter( item -> {
if( valueType != null && if( valueType != null &&
!valueType.equals( "(any)" ) && !valueType.equals( "(any)" ) &&
!valueType.equals( typeOfValue( item.value ) ) ) !typeOfValue( item.value ).startsWith( valueType ) )
return false; return false;
if( filters == null ) if( filters == null )
@@ -478,8 +478,13 @@ public class FlatUIDefaultsInspector
return "Boolean"; return "Boolean";
if( value instanceof Border ) if( value instanceof Border )
return "Border"; return "Border";
if( value instanceof Color ) if( value instanceof Color ) {
if( ((Color)value).getAlpha() != 255 )
return "Color (\u03b1)";
if( value instanceof DerivedColor )
return "Color (\u0192)";
return "Color"; return "Color";
}
if( value instanceof Dimension ) if( value instanceof Dimension )
return "Dimension"; return "Dimension";
if( value instanceof Float ) if( value instanceof Float )
@@ -595,6 +600,8 @@ public class FlatUIDefaultsInspector
"Boolean", "Boolean",
"Border", "Border",
"Color", "Color",
"Color (\u03b1)",
"Color (\u0192)",
"Dimension", "Dimension",
"Float", "Float",
"Font", "Font",

View File

@@ -42,6 +42,8 @@ new FormModel {
addElement( "Boolean" ) addElement( "Boolean" )
addElement( "Border" ) addElement( "Border" )
addElement( "Color" ) addElement( "Color" )
addElement( "Color (α)" )
addElement( "Color (ƒ)" )
addElement( "Dimension" ) addElement( "Dimension" )
addElement( "Float" ) addElement( "Float" )
addElement( "Font" ) addElement( "Font" )