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

fix: don't attempt to scale windows opted out of scaling #5400

Merged
merged 4 commits into from
May 18, 2024

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented May 17, 2024

I wanted to get rid of the duplicate scaling we do, but I noticed that the settings dialog still receives scaling events even though it opted out of custom scaling. This is because of our widget-tree, where the settings window is a descendant of the main window, causing setScale to be called on it (~> and its children). That's not desired.

So instead of using Qt's findChildren, we're now using a custom recursive loop over all children. Its general structure is similar to Qt's, except that we don't keep a list. This might bite us if any objects are added/removed while iterating (in that case we can dump them into a vector first). If any BaseWindow is encountered that has custom scaling disabled, we won't go into it (that's the main fix).

I also found a misleading call to scale in the settings dialog I missed in #4868 (the scale is always 1).

@pajlada pajlada enabled auto-merge (squash) May 18, 2024 10:10
@pajlada pajlada merged commit 3ed1c0f into Chatterino:master May 18, 2024
17 checks passed
@Nerixyz Nerixyz deleted the fix/settings-scale branch May 18, 2024 10:38
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