Fix incorrect vertical position of some ckeckboxes in some wxGrid used in dialogs

This commit is contained in:
jean-pierre charras 2020-10-04 10:34:31 +02:00
parent 9e115a548e
commit ba8b8d2738
3 changed files with 4 additions and 4 deletions

View File

@ -191,7 +191,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
attr = new wxGridCellAttr; \
attr->SetRenderer( new wxGridCellBoolRenderer() ); \
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM ); \
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
attr->SetReadOnly(); \
m_grid->SetAttr( aRow, aCol, attr ); \
m_grid->SetCellValue( aRow, aCol, ( aValue ) ? "1" : "" )

View File

@ -239,7 +239,7 @@ bool PANEL_MODEDIT_DEFAULTS::TransferDataToWindow()
auto attr = new wxGridCellAttr;
attr->SetRenderer( new wxGridCellBoolRenderer() );
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
m_layerClassesGrid->SetAttr( i, COL_TEXT_ITALIC, attr );
}
}

View File

@ -115,13 +115,13 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow()
auto attr = new wxGridCellAttr;
attr->SetRenderer( new wxGridCellBoolRenderer() );
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
m_grid->SetAttr( i, COL_TEXT_ITALIC, attr );
attr = new wxGridCellAttr;
attr->SetRenderer( new wxGridCellBoolRenderer() );
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
m_grid->SetAttr( i, COL_TEXT_UPRIGHT, attr );
}
}