Use "pair of ints" type for wxGridBagSizer size and position in XRC

Introduce a new type for XRC values imaginatively called just "pair of
integers" which can be used for values not expressed in pixels and hence for
which it doesn't make sense to use dialog units nor to scale them by the DPI.

Use this new type for wxGridBagSizer position and span elements to prevent
them from being changed when using higher than normal DPI.

Closes #17592.
This commit is contained in:
Vadim Zeitlin
2016-07-06 18:44:07 +02:00
parent c4d2ba1335
commit f68c67aa85
6 changed files with 54 additions and 12 deletions

View File

@@ -281,6 +281,17 @@ preceding it is interpreted as dialog units in the parent window, otherwise
it's a DPI-independent pixel value.
@subsection overview_xrcformat_type_pair_ints Pair of integers
This is similar to @ref overview_xrcformat_type_size size, but for values that
are not expressed in pixels and so doesn't allow "d" suffix nor does any
DPI-dependent scaling, i.e. the format is just
size := x "," y
and @c x and @c y are just integers which are not interpreted in any way.
@subsection overview_xrcformat_type_text Text
String properties use several escape sequences that are translated according to
@@ -2316,11 +2327,11 @@ properties:
(default: 0).}
@row3col{minsize, @ref overview_xrcformat_type_size,
Minimal size of this item (default: no min size).}
@row3col{ratio, @ref overview_xrcformat_type_size,
@row3col{ratio, @ref overview_xrcformat_type_pair_ints,
Item ratio, see wxSizer::SetRatio() (default: no ratio).}
@row3col{cellpos, @ref overview_xrcformat_type_pos,
@row3col{cellpos, @ref overview_xrcformat_type_pair_ints,
(wxGridBagSizer only) Position, see wxGBSizerItem::SetPos() (required). }
@row3col{cellspan, @ref overview_xrcformat_type_size,
@row3col{cellspan, @ref overview_xrcformat_type_pair_ints,
(wxGridBagSizer only) Span, see wxGBSizerItem::SetSpan() (required). }
@endTable