]> git.saurik.com Git - wxWidgets.git/commit
Fix wxHtmlWindow to correctly decide whether to show scrollbars.
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 14 Feb 2010 15:27:42 +0000 (15:27 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 14 Feb 2010 15:27:42 +0000 (15:27 +0000)
commita7b2c092b782f57a4aebd31802a9c81741f208b1
tree35f7dcc1c8db8ab5a171a702362a034a59999553
parent27c14b30bcc96bc408a146e91e4befb08f6dd0ea
Fix wxHtmlWindow to correctly decide whether to show scrollbars.

wxHtmlWindow::CreateLayout()'s algorithm was both naive (not properly
accounting for scrollbar visibility changes during layout) and broken
(incorrectly rounding when computing scroll steps and adding
GetCharHeight() value to the height in an attempt to mitigate the
harm).

This algorithm should properly for scrollbars in all situations.
Rounding is done in such way that the content is fully viewable, while
at the same time not showing scrollbars needlessly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/html/htmlwin.cpp