mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 22:47:13 -06:00
UIDefaultsLoader: added tint() and shade() color functions (inspired by Less CSS)
This commit is contained in:
@@ -371,10 +371,17 @@ class FlatCompletionProvider
|
||||
addFunction( "changeLightness", hslChangeParams );
|
||||
addFunction( "changeAlpha", hslChangeParams );
|
||||
|
||||
String weightParamDesc = "(optional) 0-100%, default is 50%";
|
||||
addFunction( "mix",
|
||||
"color1", colorParamDesc,
|
||||
"color2", colorParamDesc,
|
||||
"weight", "(optional) 0-100%, default is 50%" );
|
||||
"weight", weightParamDesc );
|
||||
addFunction( "tint",
|
||||
"color", colorParamDesc,
|
||||
"weight", weightParamDesc );
|
||||
addFunction( "shade",
|
||||
"color", colorParamDesc,
|
||||
"weight", weightParamDesc );
|
||||
}
|
||||
|
||||
private void addFunction( String name, String... paramNamesAndDescs ) {
|
||||
|
||||
@@ -69,6 +69,8 @@ public class FlatThemeTokenMaker
|
||||
tokenMap.put( "changeLightness", TOKEN_FUNCTION );
|
||||
tokenMap.put( "changeAlpha", TOKEN_FUNCTION );
|
||||
tokenMap.put( "mix", TOKEN_FUNCTION );
|
||||
tokenMap.put( "tint", TOKEN_FUNCTION );
|
||||
tokenMap.put( "shade", TOKEN_FUNCTION );
|
||||
tokenMap.put( "lazy", TOKEN_FUNCTION );
|
||||
|
||||
// function options
|
||||
|
||||
Reference in New Issue
Block a user