[Libreoffice-commits] core.git: vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jan 15 13:06:11 UTC 2019
vcl/source/window/toolbox.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit b56ad2a1292b01647c4ee1f4364f7c4aa20fc449
Author: heiko tietze <tietze.heiko at gmail.com>
AuthorDate: Fri Jan 11 13:14:46 2019 +0100
Commit: Heiko Tietze <tietze.heiko at gmail.com>
CommitDate: Tue Jan 15 14:05:45 2019 +0100
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 at gmail.com>
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;
More information about the Libreoffice-commits
mailing list