aldelaro5 / dolphin-memory-engine

A RAM search made specifically to search, monitor and edit the Dolphin emulator's emulated memory
MIT License
163 stars 38 forks source link

Use correct font in painter in **Memory Viewer** dialog. #159

Closed cristian64 closed 4 months ago

cristian64 commented 4 months ago

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
DME - Memory Viewer (incorrect font size) png DME - Memory Viewer (correct font size)

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.

dreamsyntax commented 4 months ago

I'm not sure what was going on with your before screenshots... I see no change on Windows at least. Unless I'm misunderstanding and you explicitly made it small for demonstrating the width?

Windows Before: image

Windows After: image


Linux Before: before

Linux After: after

Ctrl+Mouse Scroll seems to work the same on both builds.

cristian64 commented 4 months ago

I'm not sure what was going on with your before screenshots... I see no change on Windows at least. Unless I'm misunderstanding and you explicitly made it small for demonstrating the width?

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?

dreamsyntax commented 4 months ago

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?

Ah yep, thats what it was. Reproduced on Windows image