Resolves: tdf#145974 reduce the papersize by scrollbar thickness
if scrollbar required and scrollbar isn't an overlay one Change-Id: I839fd8c214febadb80f692b53dc156e251f506ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126645 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -390,8 +390,13 @@ void AnnotationWindow::DoResize()
|
||||
|
||||
if( aTextHeight > aHeight )
|
||||
{
|
||||
// we need vertical scrollbars and have to reduce the width
|
||||
aWidth -= mxVScrollbar->get_scroll_thickness();
|
||||
const int nThickness = mxVScrollbar->get_scroll_thickness();
|
||||
if (nThickness)
|
||||
{
|
||||
// we need vertical scrollbars and have to reduce the width
|
||||
aWidth -= nThickness;
|
||||
mpOutliner->SetPaperSize(rDevice.PixelToLogic(Size(aWidth, aHeight)));
|
||||
}
|
||||
mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS);
|
||||
}
|
||||
else
|
||||
|
@@ -752,8 +752,13 @@ void SwAnnotationWin::DoResize()
|
||||
|
||||
if (aTextHeight > aHeight)
|
||||
{
|
||||
// we need vertical scrollbars and have to reduce the width
|
||||
aWidth -= mxVScrollbar->get_scroll_thickness();
|
||||
const int nThickness = mxVScrollbar->get_scroll_thickness();
|
||||
if (nThickness)
|
||||
{
|
||||
// we need vertical scrollbars and have to reduce the width
|
||||
aWidth -= nThickness;
|
||||
mpOutliner->SetPaperSize(PixelToLogic(Size(aWidth, aHeight)));
|
||||
}
|
||||
mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user