Kaydet (Commit) 0050073b authored tarafından Miklos Vajna's avatar Miklos Vajna

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
(cherry picked from commit f411ef1b)
üst 80169264
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment