On Mon, 12 Aug 2024 09:53:10 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
> I still don't quite understand where the margin comes from. > > A comment, like the one you have currently, which points to where the values > come from would be good. > > Adding anything to public javadoc requires a CSR. Not sure if you want to go > this way. It's not worth it. If developer can customise the border, it should > not be specified in javadoc. Metal (and the custom L&Fs) seem to use BasicLookAndFeel's default value for `Button.margin` which is (2, 14, 2, 14). This can be found in `BasicLookAndFeel.java`. Other L&Fs have set values for `Button.margin` but Metal does not. For example, `AquaLookAndFeel` has a value of (0, 2, 0, 2) for `Button.margin`. I agree it's more difficult to add anything to public javadocs. I can add the note to `BasicLookAndFeel.java` instead and note that the default installed L&Fs have a vastly different horizontal margin compared to Basic's value minus Metal L&F. Not sure of the best way to phrase this yet, but this is where the margin values itself comes from. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20482#issuecomment-2286960656