Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

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

Closed
yanokwa opened this issue Sep 17, 2019 · 6 comments · Fixed by #816
Closed

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

yanokwa opened this issue Sep 17, 2019 · 6 comments · Fixed by #816
Assignees

Comments

@yanokwa
Copy link
Member

yanokwa commented Sep 17, 2019

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
Copy link
Contributor

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

@dcbriccetti
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

I’m looking at the broader resizing issue now.

@dcbriccetti
Copy link
Contributor

dcbriccetti commented Sep 20, 2019

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
Copy link
Contributor

It's looking great! Thanks, Dave!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants