Merge branch 'minor-pg-fixes'

Minor wxPropertyGrid fixes, notably fixing the expander buttons
appearance in high DPI under MSW.

See #24304.
This commit is contained in:
Vadim Zeitlin 2024-02-13 21:40:27 +01:00
commit 19038ea58f
2 changed files with 7 additions and 2 deletions

View file

@ -6,8 +6,8 @@
<object class="wxBoxSizer">
<object class="sizeritem">
<option>1</option>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
<flag>wxEXPAND</flag>
<minsize>400,500</minsize>
<object class="wxPropertyGridManager">
<style>wxPG_AUTO_SORT|wxPG_TOOLTIPS|wxPG_TOOLBAR</style>
<exstyle>wxPG_EX_MODE_BUTTONS|wxPG_EX_HELP_AS_TOOLTIPS</exstyle>

View file

@ -1308,6 +1308,11 @@ void wxPropertyGrid::CalculateFontAndBitmapStuff( int vspacing )
#endif
#ifdef wxPG_ICON_WIDTH
// Icons are always square in this case.
m_iconHeight = m_iconWidth;
#endif
m_gutterWidth = m_iconWidth / wxPG_GUTTER_DIV;
if ( m_gutterWidth < wxPG_GUTTER_MIN )
m_gutterWidth = wxPG_GUTTER_MIN;