Kaydet (Commit) 7be22a8b authored tarafından Ashod Nakashian's avatar Ashod Nakashian Kaydeden (comit) Jan Holesovsky

sfx2: LOK: better fit of sidebar decks

As the patch comment explains, the properties
deck needs to be rendered with height long
enough to avoid scrolling, but others would
be greedy in using up all the available height,
so we render them in more restricted space.

Change-Id: I361e653239e22a7be0e5d75505cdcde18f2367d3
üst 94d7d8bc
......@@ -416,13 +416,18 @@ void SidebarController::NotifyResize()
{
if (comphelper::LibreOfficeKit::isActive())
{
// We want to let the layouter use up as much of the
// height as necessary to make sure no scrollbar is
// visible. This only works when there are no greedy
// panes that fill up all available area. So we only
// use this for the PropertyDeck, which has no such
// panes, while most other do. This is fine, since
// it's the PropertyDeck that really has many panes
// that can collapse or expand. For others, limit
// the height to something sensible.
const sal_Int32 nExtHeight = (msCurrentDeckId == "PropertyDeck" ? 2000 : 600);
// No TabBar in LOK (use nWidth in full).
// Use the minimum height that is large enough to let the
// layouter expand the panes maximally (that have a minimal
// height before the scrollbar is shown), so we never get
// scrollbars (we want scrolling to be done on the rendered
// image in the client, which is much faster).
mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth, 650);
mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth, nExtHeight);
}
else
mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth - nTabBarDefaultWidth, nHeight);
......
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