Change interpretation of font height in wxMSW to mean character height.

Accept both positive and negative height values in wxFont::SetPixelSize() in
wxMSW and map them both to a negative height when passing to MSW API in order
to request mapping against the character height and not the total cell height.

For positive heights this is more consistent with the other ports and also
expectations of people using this function. We keep the possibility to use
the negative heights inly for compatibility with the existing code which
worked around the (incorrect) interpretation of the positive height as cell
heights in the previous wxMSW versions by passing a negative height
explicitly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-11-06 20:47:52 +00:00
parent aa2444bd9e
commit 5414d62e3a
2 changed files with 22 additions and 7 deletions

View File

@@ -95,6 +95,15 @@ Changes in behaviour not resulting in compilation errors, please read this!
sizes of the sizer items to be in the same proportion as the items
proportions to return to the old behaviour.
- Interpretation of font height in pixels parameter has changed in wxFont
ctor and SetPixelSize() in wxMSW: it is now used as character height and not
the total cell height. If you previously used negative height to explicitly
request character height matching, you may now change your code to use
positive value (passing negative height still works but is undocumented and
deprecated). If you used positive height before you should retest your code
to check if the changes correspond to your expectations. And if you do need
the old behaviour please contact us at wx-dev to let us know about it!
- wxWindow::Freeze/Thaw() are not virtual any more, if you overrode them in
your code you need to override DoFreeze/DoThaw() instead now.