Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: remove word wrap from alarm field to fix rendering issue in rix #496

Closed
wants to merge 1 commit into from

Conversation

ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented May 24, 2022

Description

One small follow-up to the clipping fixes in #494
"no alarm" is often rendering as "no", with alarm being clipped at the newline. Force "no alarm" to be one line by disabling word wrap on this QLabel.

@ZLLentz ZLLentz requested review from klauer and tangkong May 24, 2022 20:00
@ZLLentz ZLLentz marked this pull request as draft May 24, 2022 20:14
@ZLLentz
Copy link
Member Author

ZLLentz commented May 24, 2022

on second thought, I'm not sure about this as a solution- might close because it causes some sizing oddities
I need to understand why the "no alarm" text is clipping first, it wasn't obvious at first look and I didn't have a lot of time set aside to sit in RIX to figure out the specifics

@klauer
Copy link
Contributor

klauer commented May 24, 2022

Just a guess -

Maybe size policies are being a problem here. The alarm_label is set to the default size policy of preferred:

Preferred: The sizeHint() is best, but the widget can be shrunk and still be useful. The widget can be expanded, but there is no advantage to it being larger than sizeHint() (the default QWidget policy).

Should it not be minimum (or even fixed based on the contents)?

@ZLLentz
Copy link
Member Author

ZLLentz commented May 24, 2022

you're right, it cannot be shrunk and still be useful, so it should not be preferred

@ZLLentz
Copy link
Member Author

ZLLentz commented May 24, 2022

Some more thinking: having size differences between different text in the same box will continue to cause annoying problems as the gui shifts around when alarms are set and cleared. I think part of the solution needs to include normalizing the text used in this field so that the layout doesn't change when the text is changed.

@ZLLentz
Copy link
Member Author

ZLLentz commented Jun 27, 2024

This is no longer needed after #611

@ZLLentz ZLLentz closed this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants