]> git.saurik.com Git - wxWidgets.git/commit
Fixed dialog units <-> pixels conversion.
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 24 Jan 2010 11:51:09 +0000 (11:51 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 24 Jan 2010 11:51:09 +0000 (11:51 +0000)
commit5c3c1372775ad7fd04448fb033ba1224780f6b65
tree5ba5b8cd10ceb199f87f2777e815dccc63ef0526
parent8cb03510a15d9b9d2c93ea7411c84a426884aab3
Fixed dialog units <-> pixels conversion.

The computation is now identical to Windows native one. To achieve this,
MSDN-recommended GetTextExtent() call is used instead of GetCharWidth().
wxMulDivInt32() is used instead of integer arithmetics to achieve
correct rounding.

Use toplevel parent's font instead of window's own. This makes more
sense, as dialog units are defined for TLWs, not individual subcontrols.

Also fixed wxMSW's wxButton::GetDefaultSize() to compute dialog units
correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/private/window.h [new file with mode: 0644]
include/wx/window.h
src/common/wincmn.cpp
src/msw/button.cpp