X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a547ebffd690e9d95e0bd9023f48489814413b6b..07d4b94c3b5d8876d3c9a5f93048afdd6734fe78:/src/html/htmlwin.cpp diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index b3afd179dc..7c08bbbd3f 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -249,26 +249,30 @@ void wxHtmlWindow::CreateLayout() if (!m_Cell) return; if (m_Style == wxHW_SCROLLBAR_NEVER) { + SetScrollbars(1, 1, 0, 0); // always off GetClientSize(&ClientWidth, &ClientHeight); m_Cell -> Layout(ClientWidth); } else { GetClientSize(&ClientWidth, &ClientHeight); +#ifndef __WXMSW__ + // VS : this looks extremely ugly under windoze, better fix needed! SetScrollbars(1, 1, 0, ClientHeight * 2); // always on +#endif GetClientSize(&ClientWidth, &ClientHeight); m_Cell -> Layout(ClientWidth); - GetClientSize(&ClientWidth, &ClientHeight); - if (ClientHeight < m_Cell -> GetHeight()) { + if (ClientHeight < m_Cell -> GetHeight()) { SetScrollbars(HTML_SCROLL_STEP, HTML_SCROLL_STEP, m_Cell -> GetWidth() / HTML_SCROLL_STEP, m_Cell -> GetHeight() / HTML_SCROLL_STEP /*cheat: top-level frag is always container*/); } - else { /* we fit into window, no need for scrollbars */ - SetScrollbars(1, 1, 0, 0); // disable... - m_Cell -> Layout(ClientWidth); // ...and relayout - } + else { /* we fit into window, no need for scrollbars */ + SetScrollbars(1, 1, 0, 0); // disable... + GetClientSize(&ClientWidth, &ClientHeight); + m_Cell -> Layout(ClientWidth); // ...and relayout + } } }