FlatLaf icon indicating copy to clipboard operation
FlatLaf copied to clipboard

Theming of LaF components with JSON properties

Open Chris2011 opened this issue 5 years ago • 4 comments

It would be very nice, if we can have a config, which makes more fun for me as a frontend developer to style all the components easily by my own via CSS or maybe with a JSON config file. We are talking about stuff, that are already stylable like borders (color, width, style, shadow, etc.) inputs (color, size, margin, padding, etc.) and and and. Maybe with CSS it will be a bit hard to map the correct values to the correct fields but with a json config file, it would be nice to have smth like this:

CompletionPopup: {
   "matchForeground": "#fff",
   "disabledBackground": "#ccc"
}

That is first just fun to do that and very easy to create new look and feels and second, I hope it will be easy of switchting look and feels in Netbeans without a restart. Just guessing, beacuse it is just switchting properties and swing needs to updates it.

Chris2011 avatar Dec 18 '19 14:12 Chris2011

Isn't that a core concept of JavaFX?

j-dimension avatar Jan 07 '20 16:01 j-dimension

@j-dimension could be, but I figured it out, that this is still possible with FlatLaf via Themes: https://github.com/mallowigi/material-theme-ui-lite/blob/master/src/main/resources/themes/Material%20Darker%20Contrast.theme.json so how can we achieve that in for example NetBeans? ;) @DevCharly Atm the problem of NetBeans is, that we need to restart after we change the look and feel. This is not that nice, if the IDE starts and needs some couple of time to open the projects and reindexing and and and. So I know that IntelliJ doesn't have this problem so it would be great if we can have this for NetBeans too.

Chris2011 avatar Jan 20 '20 09:01 Chris2011

I know this repo is independent from NetBeans, but I saw the demo and it was like WOW, no restart of the demo app, after changeing a theme. And this is the exact behaviour that I wanted to have for my favorite IDE :)

Chris2011 avatar Jan 20 '20 09:01 Chris2011

I already created a ticket for that: https://issues.apache.org/jira/browse/NETBEANS-3746

Chris2011 avatar Feb 10 '20 15:02 Chris2011