mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
UI defaults inspector: filter by colors with alpha and derived colors
This commit is contained in:
@@ -446,7 +446,7 @@ public class FlatUIDefaultsInspector
|
||||
model.setFilter( item -> {
|
||||
if( valueType != null &&
|
||||
!valueType.equals( "(any)" ) &&
|
||||
!valueType.equals( typeOfValue( item.value ) ) )
|
||||
!typeOfValue( item.value ).startsWith( valueType ) )
|
||||
return false;
|
||||
|
||||
if( filters == null )
|
||||
@@ -478,8 +478,13 @@ public class FlatUIDefaultsInspector
|
||||
return "Boolean";
|
||||
if( value instanceof 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";
|
||||
}
|
||||
if( value instanceof Dimension )
|
||||
return "Dimension";
|
||||
if( value instanceof Float )
|
||||
@@ -595,6 +600,8 @@ public class FlatUIDefaultsInspector
|
||||
"Boolean",
|
||||
"Border",
|
||||
"Color",
|
||||
"Color (\u03b1)",
|
||||
"Color (\u0192)",
|
||||
"Dimension",
|
||||
"Float",
|
||||
"Font",
|
||||
|
||||
@@ -42,6 +42,8 @@ new FormModel {
|
||||
addElement( "Boolean" )
|
||||
addElement( "Border" )
|
||||
addElement( "Color" )
|
||||
addElement( "Color (α)" )
|
||||
addElement( "Color (ƒ)" )
|
||||
addElement( "Dimension" )
|
||||
addElement( "Float" )
|
||||
addElement( "Font" )
|
||||
|
||||
Reference in New Issue
Block a user