-
Notifications
You must be signed in to change notification settings - Fork 38
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
Use correct font in painter in **Memory Viewer** dialog. #159
Use correct font in painter in **Memory Viewer** dialog. #159
Conversation
… all platforms. Previously, the system-defined, fixed-width font was used only for macOS; now the font is used on Windows and Linux too, as opposed to using some hardcoded font families that may not be available in the system.
I'm not sure what was going on with your before screenshots... I see no change on Windows at least. Ctrl+Mouse Scroll seems to work the same on both builds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes seem sane to me, I just don't notice any difference in my tests on both windows and linux (cachyos, kde, wayland)
If it fixes this issue for some other configurations, I don't have a problem with it being merged.
Feel free to merge when you are satisfied.
Before taking the screenshots, I had used the mouse wheel to increase the font size. Without this fix (i.e. the screenshot in the Before column), the grid grows to match the font size, but the text is rendered with a smaller font size. I have now realized that the issue only manifests if the theme is not set to System. Could you confirm you can reproduce the problem with any other theme? |
a1f0e85
to
b72785e
Compare
Although the font was set up in the **Memory Viewer** dialog's main widget, the viewport's painter that actually renders the text was still using the default font. When a theme (other than **System**) was used, this resulted in the grid and the text having a mismatched size, which was specially noticeable when the font size was made large or small: | Before | After | | --- | --- | |  |  |
The initial font size for the **Memory Viewer** dialog is now based on a percentage of the default font size.
b72785e
to
ff6308f
Compare
Although the font was set up in the Memory Viewer dialog's main widget, the viewport's painter that actually renders the text was still using the default font.
When a theme (other than System) was used, this resulted in the grid and the text having a mismatched size, which was specially noticeable when the font size was made large or small:
Bonus changes: initial font size is no longer hardcoded to 15; now it's based on a percentage (+50%) of the size of the default font.