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

Improve preferences layout for long translations #1856

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

J5lx
Copy link
Member

@J5lx J5lx commented Jun 29, 2024

Fixes #1850 by simply removing the size restriction altogether. I couldn’t think of a good reason to keep it. I also made the dialog a little bigger by default and made some changes to the “tab bar” to avoid cutting off long translations.

Before:

image

After:

image

@J5lx J5lx added UX Related to the way users interact with the program Preferences Crash labels Jun 29, 2024
@J5lx J5lx added this to the 0.7.0 milestone Jun 29, 2024
<height>16777215</height>
</size>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for the size hints to work properly. Since this is essentially an entirely vertical widget, this only really affects the position of the scrollbar in rtl languages. Given that the dialog is now by default large enough to show all items without scrolling, that shouldn’t be a big deal.

Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the size constraint on the dialog is fine by me, not sure why we had it either.

The code you added to improve on the tab view placing completely broke it for me though.

loooong

The placement of the tabs are also now misaligned, even without the sizeHint code.

Before After
image image

@J5lx
Copy link
Member Author

J5lx commented Jun 29, 2024

That’s odd, I’m definitely not seeing that on Linux. On Windows, Qt 5 has that issue but not Qt 6, maybe that’s the issue? I’ll see if I can figure out what’s going on there.

The placement of the tabs are also now misaligned

You mean the left-alignment? That’s what the size hint is supposed to deal with. It’s not technically new though. It’s not as noticeable in the English version because of the relatively short length of the labels, but in other languages it can be painfully obvious (see my “before” screenshot in the PR description).

@MrStevns
Copy link
Member

MrStevns commented Jun 29, 2024

That’s odd, I’m definitely not seeing that on Linux. On Windows, Qt 5 has that issue but not Qt 6, maybe that’s the issue? I’ll see if I can figure out what’s going on there.

Ah good point, I was testing with Qt 5 but even with my Qt 6 build the issue remains. I've tested with 6.6.2 and 6.7.0.

You mean the left-alignment? That’s what the size hint is supposed to deal with. It’s not technically new though. It’s not as noticeable in the English version because of the relatively short length of the labels, but in other languages it can be painfully obvious (see my “before” screenshot in the PR description).

Ah right.. forget that part then.

@J5lx J5lx force-pushed the fixes/preferences-layout branch from c8b5ea6 to 5ffd283 Compare June 29, 2024 19:24
@J5lx
Copy link
Member Author

J5lx commented Jun 29, 2024

I added some changes that, at least on Windows, seem to make the size hint behave as intended, PTAL.

Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That did the trick, both qt 5 and qt 6 works now.

Good job 👍

@MrStevns
Copy link
Member

btw. shouldn't the PR point to the release branch or are we simply not applying more bug fixes to the release?

@chchwy chchwy changed the base branch from master to release/0.7.0 June 30, 2024 08:28
@chchwy chchwy changed the base branch from release/0.7.0 to master June 30, 2024 08:28
@chchwy
Copy link
Member

chchwy commented Jun 30, 2024

btw. shouldn't the PR point to the release branch or are we simply not applying more bug fixes to the release?

Target the master branch since the change was made based on the master branch. And then I will cherry-pick this to the release branch.

@J5lx
Copy link
Member Author

J5lx commented Jun 30, 2024

Since the change is for both branches I figured I might as well target master so it can then be cherry-picked to the release branch. But ofc I could also do it the other way around for any future changes if that’s more convenient.

@chchwy chchwy merged commit 258c31b into pencil2d:master Jul 2, 2024
10 checks passed
@J5lx J5lx deleted the fixes/preferences-layout branch July 13, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash Preferences UX Related to the way users interact with the program
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

app crashes when opening settings
3 participants