From: Václav Slavík Date: Thu, 26 Sep 2013 12:55:17 +0000 (+0000) Subject: XRC: make wxSplitterWindow's sashpos and minpanesize dimensions. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/85d64f6aa1d657b9463cb0cefedc5dbbf1facfac?hp=3b9c5fe8b3ace89e705b21a3318ffe74d904a434 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 --- diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index 72767dce96..9ad73560f1 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -1666,9 +1666,9 @@ wxWidgets 2.9.5, another one: @hdr3col{property, type, description} @row3col{orientation, @ref overview_xrcformat_type_string, 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).} -@row3col{minsize, integer, +@row3col{minsize, @ref overview_xrcformat_type_dimension, Minimum child size (default: not set).} @row3col{gravity, @ref overview_xrcformat_type_float, Sash gravity, see wxSplitterWindow::SetSashGravity() (default: not set).} diff --git a/src/xrc/xh_split.cpp b/src/xrc/xh_split.cpp index 6ce4d25d82..6f15a3bb1c 100644 --- a/src/xrc/xh_split.cpp +++ b/src/xrc/xh_split.cpp @@ -56,8 +56,8 @@ wxObject *wxSplitterWindowXmlHandler::DoCreateResource() SetupWindow(splitter); - long sashpos = GetLong(wxT("sashpos"), 0); - long minpanesize = GetLong(wxT("minsize"), -1); + long sashpos = GetDimension(wxT("sashpos"), 0); + long minpanesize = GetDimension(wxT("minsize"), -1); float gravity = GetFloat(wxT("gravity"), 0.0); if (minpanesize != -1) splitter->SetMinimumPaneSize(minpanesize);