summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2019-01-11 13:14:46 +0100
committerHeiko Tietze <tietze.heiko@gmail.com>2019-01-15 14:05:45 +0100
commitb56ad2a1292b01647c4ee1f4364f7c4aa20fc449 (patch)
tree3286fc974b635a87079698778de433e020a94064 /vcl
parentdcf185ea162a4f593c66639cb3aebdc9c3d1a60f (diff)
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 <tietze.heiko@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox.cxx7
1 files changed, 5 insertions, 2 deletions
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;