Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #12127 from sepalani/ascii_
MemoryViewWidget: Fix some characters being truncated
  • Loading branch information
AdmiralCurtiss committed Aug 26, 2023
2 parents 65a9be5 + 5738637 commit d8e3543
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp
Expand Up @@ -208,7 +208,7 @@ MemoryViewWidget::MemoryViewWidget(QWidget* parent)
void MemoryViewWidget::UpdateFont()
{
const QFontMetrics fm(Settings::Instance().GetDebugFont());
m_font_vspace = fm.lineSpacing();
m_font_vspace = fm.lineSpacing() + 4;
// BoundingRect is too unpredictable, a custom one would be needed for each view type. Different
// fonts have wildly different spacing between two characters and horizontalAdvance includes
// spacing.
Expand Down Expand Up @@ -283,8 +283,8 @@ void MemoryViewWidget::CreateTable()

// This sets all row heights and determines horizontal ascii spacing.
// Could be placed in UpdateFont() but doesn't apply correctly unless called more.
m_table->verticalHeader()->setDefaultSectionSize(m_font_vspace - 1);
m_table->verticalHeader()->setMinimumSectionSize(m_font_vspace - 1);
m_table->verticalHeader()->setDefaultSectionSize(m_font_vspace);
m_table->verticalHeader()->setMinimumSectionSize(m_font_vspace);
m_table->horizontalHeader()->setMinimumSectionSize(m_font_width * 2);

const QSignalBlocker blocker(m_table);
Expand Down

0 comments on commit d8e3543

Please sign in to comment.