- You can test your plugin to fit to dark mode by using
DebugParameter
like this:public static void main(String args[]) throws Exception { debug(DebugParameter.custom().setDarkMode(true).build()); }
- There is also
isDarkMode()
method and overridableapplicationConfigChanged()
method for adjusting color at runtime.@Override public void applicationConfigChanged() throws Exception { if (isDarkMode()) { node.setStyle("-fx-background-color: -fx-base;"); } else { node.setStyle("-fx-background-color: #ffffff;"); } }
Note: The
applicationConfigChanged()
method will be called when the Actlist user changes dark mode property or proxy host in the configuration view.
- Previous
- Next