Use DIPs for the margins around text in wxGrid columns
Improve the appearance on high DPI displays where the margins were previously too small under MSW.
This commit is contained in:
parent
f29b6564b1
commit
16619c5e77
@ -9401,7 +9401,7 @@ wxGrid::AutoSizeColOrRow(int colOrRow, bool setAsMin, wxGridDirection direction)
|
||||
dc.SetFont( GetLabelFont() );
|
||||
|
||||
// We add some margin around text for better readability.
|
||||
const int margin = column ? 10 : 6;
|
||||
const int margin = FromDIP(column ? 10 : 6);
|
||||
|
||||
if ( column )
|
||||
{
|
||||
|
@ -1019,7 +1019,7 @@ void GridTestCase::CheckFirstColAutoSize(int expected)
|
||||
void GridTestCase::AutoSizeColumn()
|
||||
{
|
||||
// Hardcoded extra margin for the columns used in grid.cpp.
|
||||
const int margin = 10;
|
||||
const int margin = m_grid->FromDIP(10);
|
||||
|
||||
wxGridCellAttr *attr = m_grid->GetOrCreateCellAttr(0, 0);
|
||||
wxGridCellRenderer *renderer = attr->GetRenderer(m_grid, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user