-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Normal
-
Affects Version/s: 2.1.0
-
None
the setTheme() (e.g. DrillUpButton.setTheme()) methods no longer support nested styles
e.g. this style config cannot be expressed as a Map<String, String>
"theme":{"fill":"#E8E8EA", "stroke":"#6E6E78", "stroke-width":"1", "r":"0", "states":{ "hover":{ "fill":"#F4F4F6", "stroke":"#6E6E78", "stroke-width":"1", "r":"0"}}, "style":{ "color":"#4D5663", "fontSize":"12px", "fontFamily": "'Arial'", "fontWeight":"normal", "padding":"10px"} }
a Workaround is to use addExtraParams() passing in the config as a JSON object directly
JSONAware themeParams = (JSONAware) JSONValue.parse("{\"fill\":\"#E8E8EA\", \"stroke\":\"#FF6E78\", \"stroke-width\":\"1\", \"r\":\"0\", \"states\":{ \"hover\":{ \"fill\":\"#F400F6\", \"stroke\":\"#6E6E78\", \"stroke-width\":\"1\", \"r\":\"0\"}}, \"style\":{ \"color\":\"#4D5663\", \"fontSize\":\"12px\", \"fontFamily\": \"'Arial'\", \"fontWeight\":\"normal\", \"padding\":\"10px\"}}"); drillUpButton.addExtraAttr("theme", themeParams);