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: set initial size of widgets #5794

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jan 5, 2025

I was trying to reproduce #5411 and found this bug:

  1. Set scale to something other than 1x (ideally something with a significant difference, so you see the bug)
  2. Close Chatterino
  3. Open Chatterino
  4. Go into the settings and change the scale back to 1x (Default)
  5. Correct (now): The tabs should scale correctly
    Incorrect (before): The tabs kinda stay the same (except for the font)

We didn't save the scale of the window when adding child widgets1. So when the scale changed back to 1x, we'd assume it was 1.0 and return early.

I still can't reproduce #5411. So if anyone has a hint, please put it in the issue. Thank You!

Footnotes

  1. This only works if the parent is set and if the parent has or is a window. I added assert(dynamic_cast<BaseWindow *>(this) || dynamic_cast<BaseWidget *>(this->window())) to test this locally. Only the settings pages don't set the parent. This is fine because they will always be at 1x.

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.

1 participant