Support DPI change in sizers

Return the size of DoGetDefaultBorderInPx as float, so no precision is lost
when multiplying it for DoubleBorder and TripleBorder.

Closes #18551.
This commit is contained in:
Maarten Bent
2019-11-01 21:07:15 +01:00
parent 349e73994b
commit 918e102533
4 changed files with 60 additions and 9 deletions

View File

@@ -1493,9 +1493,21 @@ public:
This value is scaled appropriately for the current DPI on the systems
where physical pixel values are used for the control positions and
sizes, i.e. not with wxGTK or wxOSX.
@see GetDefaultBorderFractional()
*/
static int GetDefaultBorder();
/**
Returns the border used by default, with fractional precision. For
example when the border is scaled to a non-integer DPI.
@see GetDefaultBorder()
@since 3.1.4
*/
static float GetDefaultBorderFractional();
/**
Aligns the object to the left, similar for @c Align(wxALIGN_LEFT).