Skip to content

Commit

Permalink
Use correct font in painter in **Memory Viewer** dialog.
Browse files Browse the repository at this point in the history
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](https://github.com/aldelaro5/dolphin-memory-engine/assets/1853278/08e2597e-aa6a-4c6e-be5c-1fa46555b340) | ![DME - Memory Viewer (correct font size)](https://github.com/aldelaro5/dolphin-memory-engine/assets/1853278/348ee9f0-c407-4666-b040-caac62a63fb1) |
  • Loading branch information
cristian64 committed May 31, 2024
1 parent 49cc084 commit 5ef5be8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/GUI/MemViewer/MemViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ void MemViewer::paintEvent(QPaintEvent* event)
(void)event;

QPainter painter(viewport());
painter.setFont(font());
painter.setPen(QColor(Qt::black));

renderSeparatorLines(painter);
Expand Down

0 comments on commit 5ef5be8

Please sign in to comment.