XRC: make wxSplitterWindow's sashpos and minpanesize dimensions.
Parse them as dimension type (including dlg units) and not just integers. This is backward compatible. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1666,9 +1666,9 @@ wxWidgets 2.9.5, another one:
|
|||||||
@hdr3col{property, type, description}
|
@hdr3col{property, type, description}
|
||||||
@row3col{orientation, @ref overview_xrcformat_type_string,
|
@row3col{orientation, @ref overview_xrcformat_type_string,
|
||||||
Orientation of the splitter, either "vertical" or "horizontal" (default: horizontal).}
|
Orientation of the splitter, either "vertical" or "horizontal" (default: horizontal).}
|
||||||
@row3col{sashpos, integer,
|
@row3col{sashpos, @ref overview_xrcformat_type_dimension,
|
||||||
Initial position of the sash (default: 0).}
|
Initial position of the sash (default: 0).}
|
||||||
@row3col{minsize, integer,
|
@row3col{minsize, @ref overview_xrcformat_type_dimension,
|
||||||
Minimum child size (default: not set).}
|
Minimum child size (default: not set).}
|
||||||
@row3col{gravity, @ref overview_xrcformat_type_float,
|
@row3col{gravity, @ref overview_xrcformat_type_float,
|
||||||
Sash gravity, see wxSplitterWindow::SetSashGravity() (default: not set).}
|
Sash gravity, see wxSplitterWindow::SetSashGravity() (default: not set).}
|
||||||
|
@@ -56,8 +56,8 @@ wxObject *wxSplitterWindowXmlHandler::DoCreateResource()
|
|||||||
|
|
||||||
SetupWindow(splitter);
|
SetupWindow(splitter);
|
||||||
|
|
||||||
long sashpos = GetLong(wxT("sashpos"), 0);
|
long sashpos = GetDimension(wxT("sashpos"), 0);
|
||||||
long minpanesize = GetLong(wxT("minsize"), -1);
|
long minpanesize = GetDimension(wxT("minsize"), -1);
|
||||||
float gravity = GetFloat(wxT("gravity"), 0.0);
|
float gravity = GetFloat(wxT("gravity"), 0.0);
|
||||||
if (minpanesize != -1)
|
if (minpanesize != -1)
|
||||||
splitter->SetMinimumPaneSize(minpanesize);
|
splitter->SetMinimumPaneSize(minpanesize);
|
||||||
|
Reference in New Issue
Block a user