sw/source/uibase/docvw/SidebarWin.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
New commits: commit f411ef1b8065d3ae03d1a820812e64b250de0932 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Nov 20 10:24:29 2015 +0100 sw lok comments: implement painting of the vertical scrollbar This one is special, as normally its map mode is in pixels, but we need all sub-widgets to work in twips when tiled rendering. With this, the scrollbar widget (both the buttons and the button/background area of the scrollbar itself) is painted at the correct location when Writer comments have enough content so the scrollbar is visible. Change-Id: I4ee9ef8618974b965339078d2262364ec19732ef diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index c51fc57..394fcbe 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -289,8 +289,22 @@ void SwSidebarWin::PaintTile(vcl::RenderContext& rRenderContext, const Rectangle aMapMode.SetOrigin(aMapMode.GetOrigin() + aOffset); rRenderContext.SetMapMode(aMapMode); + bool bPopChild = false; + if (pChild->GetMapMode().GetMapUnit() != rRenderContext.GetMapMode().GetMapUnit()) + { + // This is needed for the scrollbar that has its map unit in pixels. + pChild->Push(PushFlags::MAPMODE); + bPopChild = true; + pChild->EnableMapMode(); + aMapMode = pChild->GetMapMode(); + aMapMode.SetMapUnit(rRenderContext.GetMapMode().GetMapUnit()); + pChild->SetMapMode(aMapMode); + } + pChild->Paint(rRenderContext, rRect); + if (bPopChild) + pChild->Pop(); rRenderContext.Pop(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits