Skip to content

Commit

Permalink
Don't override font when calculating required space.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiw committed Jan 8, 2024
1 parent 2fbd8c9 commit e2c3e49
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/freedv_reporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static int DefaultColumnWidths_[] = {
1,
#endif // defined(WIN32)
70,
70,
65,
60,
70,
60,
Expand Down Expand Up @@ -1567,19 +1567,15 @@ void FreeDVReporterDialog::addOrUpdateListIfNotFiltered_(ReporterData* data, std

int FreeDVReporterDialog::getSizeForTableCellString_(wxString str)
{
auto itemFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); //attr.font;
int textWidth = 0;
int textHeight = 0; // note: unused

m_listSpots->GetTextExtent(str, &textWidth, &textHeight, nullptr, nullptr, &itemFont);
m_listSpots->GetTextExtent(str, &textWidth, &textHeight);

// Add buffer for sort indicator and to ensure wxWidgets doesn't truncate anything almost exactly
// fitting the new column size.
textWidth += m_sortIcons->GetIcon(upIconIndex_).GetSize().GetWidth();

// Add additional buffer to provide space between columns.
textWidth += 15;

return textWidth;
}

Expand Down

0 comments on commit e2c3e49

Please sign in to comment.