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:
@@ -544,6 +544,9 @@ public:
|
||||
wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0,
|
||||
wxWindow *windowToUse = NULL) wxOVERRIDE;
|
||||
|
||||
// Gets a size which is not expressed in pixels, so not in dialog units.
|
||||
wxSize GetPairInts(const wxString& param) wxOVERRIDE;
|
||||
|
||||
// Gets a direction, complains if the value is invalid.
|
||||
wxDirection GetDirection(const wxString& param, wxDirection dirDefault = wxLEFT) wxOVERRIDE;
|
||||
|
||||
|
@@ -74,6 +74,7 @@ public:
|
||||
virtual wxPoint GetPosition(const wxString& param = wxT("pos")) = 0;
|
||||
virtual wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0,
|
||||
wxWindow *windowToUse = NULL) = 0;
|
||||
virtual wxSize GetPairInts(const wxString& param) = 0;
|
||||
virtual wxDirection GetDirection(const wxString& param, wxDirection dir = wxLEFT) = 0;
|
||||
virtual wxBitmap GetBitmap(const wxString& param = wxT("bitmap"),
|
||||
const wxArtClient& defaultArtClient = wxART_OTHER,
|
||||
@@ -296,6 +297,10 @@ protected:
|
||||
{
|
||||
return GetImpl()->GetDimension(param, defaultv, windowToUse);
|
||||
}
|
||||
wxSize GetPairInts(const wxString& param)
|
||||
{
|
||||
return GetImpl()->GetPairInts(param);
|
||||
}
|
||||
wxDirection GetDirection(const wxString& param, wxDirection dir = wxLEFT)
|
||||
{
|
||||
return GetImpl()->GetDirection(param, dir);
|
||||
|
Reference in New Issue
Block a user