getodk / briefcase

ODK Briefcase is a Java application for fetching and pushing forms and their contents. It helps make billions of data points from ODK portable. Contribute and make the world a better place! ✨💼✨
https://docs.getodk.org/briefcase-intro
Other
60 stars 154 forks source link

"Update available" text doesn't wrap properly #815

Closed yanokwa closed 4 years ago

yanokwa commented 4 years ago

When I run master, this is what the "Update available" looks like. I think it should always be on one line and not wrap. Not sure if this is a macOS thing. My guess is that it's not easily fixable. Any ideas, @dcbriccetti ?

On launch - 😄

Screen Shot 2019-09-17 at 12 39 08 PM

Make window bigger - 😟

Screen Shot 2019-09-17 at 12 39 14 PM

Make window smaller -  😭

Screen Shot 2019-09-17 at 12 39 21 PM
dcbriccetti commented 4 years ago

Hi all. My guess is that it is easily fixable. Let me take a look now.

dcbriccetti commented 4 years ago

Something funky happens when the window is sized narrower than a certain width. Maybe @ggalmazor already knows about this. But to improve this specific situation, setting the label’s minimum size before adding it to the frame keeps it from wrapping. It is not perfectly centered when in that funky zone. I’m happy to look at the larger resizing issue, but I suspect @ggalmazor may already have plans for it.

versionLabel.setMinimumSize(versionLabel.getPreferredSize());
frame.add(versionLabel, versionLabelConstraints);
ggalmazor commented 4 years ago

Thanks, Dave!

I’m happy to look at the larger resizing issue, but I suspect @ggalmazor may already have plans for it.

Not really :D This is yet another chapter of Swing that I'd need to research. If you feel like you could save us some time, please, go ahead :)

I see that nothing really adapts to window size changes, right? I can see how there's a space to the right in one of Yaw's screenshots.

dcbriccetti commented 4 years ago

I’m looking at the broader resizing issue now.

dcbriccetti commented 4 years ago

I’m having success. Changing from GridBagLayout to BorderLayout simplifies the code and improves the UI. The makeClickable method complicates things. I propose we remove the underlining. Do browsers underline links anymore? Code coming.

How does this look?

briefcase-resize.mov.zip

ggalmazor commented 4 years ago

It's looking great! Thanks, Dave!