Merge branch 'misc-dpi-bugs' of https://github.com/MaartenBent/wxWidgets
Miscellaneous DPI-related bug fixes. See https://github.com/wxWidgets/wxWidgets/pull/2128
This commit is contained in:
@@ -1457,7 +1457,7 @@ wxSize wxComboCtrlBase::DoGetSizeFromTextSize(int xlen, int ylen) const
|
|||||||
fhei += 2 * FOCUS_RING;
|
fhei += 2 * FOCUS_RING;
|
||||||
|
|
||||||
// Calculate width
|
// Calculate width
|
||||||
int fwid = xlen + FOCUS_RING + COMBO_MARGIN + DEFAULT_DROPBUTTON_WIDTH;
|
int fwid = GetNativeTextIndent() + xlen + FOCUS_RING + COMBO_MARGIN + m_btnArea.width;
|
||||||
|
|
||||||
// Add the margins we have previously set
|
// Add the margins we have previously set
|
||||||
wxPoint marg( GetMargins() );
|
wxPoint marg( GetMargins() );
|
||||||
|
@@ -619,6 +619,10 @@ wxFont* wxHtmlWinParser::CreateCurrentFont()
|
|||||||
*encptr = m_OutputEnc;
|
*encptr = m_OutputEnc;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
if ( m_windowInterface && m_windowInterface->GetHTMLWindow() )
|
||||||
|
(*fontptr)->WXAdjustToPPI(m_windowInterface->GetHTMLWindow()->GetDPI());
|
||||||
|
#endif
|
||||||
m_DC->SetFont(**fontptr);
|
m_DC->SetFont(**fontptr);
|
||||||
return (*fontptr);
|
return (*fontptr);
|
||||||
}
|
}
|
||||||
|
@@ -4924,10 +4924,13 @@ static void UpdateSizerOnDPIChange(wxSizer* sizer, float scaleFactor)
|
|||||||
ScaleCoordIfSet(min.y, scaleFactor);
|
ScaleCoordIfSet(min.y, scaleFactor);
|
||||||
sizerItem->SetMinSize(min);
|
sizerItem->SetMinSize(min);
|
||||||
|
|
||||||
|
if ( sizerItem->IsSpacer() )
|
||||||
|
{
|
||||||
wxSize size = sizerItem->GetSize();
|
wxSize size = sizerItem->GetSize();
|
||||||
ScaleCoordIfSet(size.x, scaleFactor);
|
ScaleCoordIfSet(size.x, scaleFactor);
|
||||||
ScaleCoordIfSet(size.y, scaleFactor);
|
ScaleCoordIfSet(size.y, scaleFactor);
|
||||||
sizerItem->SetDimension(wxDefaultPosition, size);
|
sizerItem->SetDimension(wxDefaultPosition, size);
|
||||||
|
}
|
||||||
|
|
||||||
// Update any child sizers if this is a sizer
|
// Update any child sizers if this is a sizer
|
||||||
UpdateSizerOnDPIChange(sizerItem->GetSizer(), scaleFactor);
|
UpdateSizerOnDPIChange(sizerItem->GetSizer(), scaleFactor);
|
||||||
|
Reference in New Issue
Block a user