From b56ad2a1292b01647c4ee1f4364f7c4aa20fc449 Mon Sep 17 00:00:00 2001 From: heiko tietze Date: Fri, 11 Jan 2019 13:14:46 +0100 Subject: Resolves tdf#122118 - Toolbar dropdown button triangles are too large Fix values for toolbar expander triangles with 7px resp. 4px depend now on the actual toolbar height. Change-Id: I0241e3cfa9472bfbd2533afa84bcbfd9ef92c920 Reviewed-on: https://gerrit.libreoffice.org/66166 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- vcl/source/window/toolbox.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4d203c6b9186..9533784c0dab 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2492,9 +2492,12 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tool float fScaleFactor = rRenderContext.GetDPIScaleFactor(); tools::Polygon aPoly(4); + int iTBHeight = rRenderContext.GetOutputSize().Height(); //scale triangle depending on theme/toolbar height - long width = 7 * fScaleFactor; - long height = 4 * fScaleFactor; + long width = round(iTBHeight/5.5) * fScaleFactor; // 7 for gtk, 5 for gen + long height = round(iTBHeight/9.5) * fScaleFactor; // 4 for gtk, 3 for gen + if (width < 4) width = 4; + if (height < 3) height = 3; long x = rDropDownRect.Left() + (rDropDownRect.getWidth() - width)/2; long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2; -- cgit