Apply review comments

This commit is contained in:
Maarten Bent
2019-09-29 19:03:23 +02:00
parent 0a7c191e27
commit 2b41ba2702
7 changed files with 17 additions and 9 deletions

View File

@@ -457,7 +457,8 @@ void wxListCtrl::MSWUpdateFontOnDPIChange(const wxSize& newDPI)
void wxListCtrl::OnDPIChanged(wxDPIChangedEvent &event)
{
const int numCols = GetColumnCount();
for ( int i = 0; i < numCols; ++i ) {
for ( int i = 0; i < numCols; ++i )
{
int width = GetColumnWidth(i);
if ( width > 0 )
width = width * event.GetNewDPI().x / event.GetOldDPI().x;
@@ -1003,7 +1004,8 @@ bool wxListCtrl::SetItem(wxListItem& info)
else
data->attr = new wxItemAttr(attrNew);
if ( data->attr->HasFont() ) {
if ( data->attr->HasFont() )
{
wxFont f = data->attr->GetFont();
f.WXAdjustToPPI(GetDPI());
data->attr->SetFont(f);