[rfc][icedtea-web] do not align buttons (in dialogs which do) to minimal size

Omair Majid omajid at redhat.com
Wed Jun 24 20:30:40 UTC 2015


* Jiri Vanek <jvanek at redhat.com> [2015-06-24 05:53]:
> Some dialogs are trying to have buttons of same width. I'm not sure it is
> necessary, but undoubtedly it cause
> https://bugzilla.redhat.com/show_bug.cgi?id=1231441
> 
> This patch is fixing it.

The implementation of sizing is broken, but that doesn't mean that we
should do away with that!

net.sourceforge.jnlp.util.logging.JavaConsole uses an approach based on
letting the layout manager set the sizes (correctly) instead of
calculating things explicitly (and getting it wrong). Put the buttons in
a JPanel with GridLayout (this forces all buttons to be the same size).
Then put the JPanel in the container where the buttons originally were.
No more wrong calculations!

This approach is also described here:
http://stackoverflow.com/questions/11536089/making-all-button-size-same

> Without debugging main methods and one null check, I would like to push this also to 1.6 and 1.5

I don't have the right to NACK this patch since I am not contributing a
better fix, but please consider keeping the same-button-sizes feature.

Thanks,
Omair

-- 
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681


More information about the distro-pkg-dev mailing list