tdf#142925 render the button arrow like it used to be

in 7.1

Change-Id: Ibbe4b7dd2212d1bc28bad7588672bb37c8259605
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117445
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index b260437..71a78d6 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -461,11 +461,27 @@ void SwAnnotationWin::SetMenuButtonColors()
                             ColorFromAlphaColor(80, mColorAnchor, mColorDark));
    xVirDev->DrawGradient(aRect, aGradient);

    //draw rect around button
    xVirDev->SetFillColor();
    xVirDev->SetLineColor(ColorFromAlphaColor(90, mColorAnchor, mColorDark));
    xVirDev->DrawRect(aRect);

    tools::Rectangle aSymbolRect(aRect);
    // 25% distance to the left and right button border
    const tools::Long nBorderDistanceLeftAndRight = ((aSymbolRect.GetWidth() * 250) + 500) / 1000;
    aSymbolRect.AdjustLeft(nBorderDistanceLeftAndRight );
    aSymbolRect.AdjustRight( -nBorderDistanceLeftAndRight );
    // 40% distance to the top button border
    const tools::Long nBorderDistanceTop = ((aSymbolRect.GetHeight() * 400) + 500) / 1000;
    aSymbolRect.AdjustTop(nBorderDistanceTop );
    // 15% distance to the bottom button border
    const tools::Long nBorderDistanceBottom = ((aSymbolRect.GetHeight() * 150) + 500) / 1000;
    aSymbolRect.AdjustBottom( -nBorderDistanceBottom );
    DecorationView aDecoView(xVirDev.get());
    aDecoView.DrawSymbol(aRect, SymbolType::SPIN_DOWN, GetTextColor(),
    aDecoView.DrawSymbol(aSymbolRect, SymbolType::SPIN_DOWN, GetTextColor(),
                         DrawSymbolFlags::NONE);
    mxMenuButton->set_image(xVirDev);
    mxMenuButton->set_size_request(aSize.Width() + 4, aSize.Height());
    mxMenuButton->set_size_request(aSize.Width() + 4, aSize.Height() + 4);
}

void SwAnnotationWin::Rescale()