diff options
author | heiko tietze <tietze.heiko@gmail.com> | 2019-01-18 09:03:57 +0100 |
---|---|---|
committer | Heiko Tietze <tietze.heiko@gmail.com> | 2019-01-18 17:56:49 +0100 |
commit | e3cc5506d695b602fbd3c6ee816e36e6a76d9d96 (patch) | |
tree | 8a3c763d1470db7c8d7b279f9d68c657c1543dec | |
parent | dba14e6a75b56b75c32cb7f07a56cfc7f13112e5 (diff) |
Resolves tdf#122118 - Toolbar dropdown button triangles are too large
Toolbar expander triangles are now scaled depending on the parent size
Change-Id: I4974c0976c1591fc09594bf4aeca020a72ebf11a
Reviewed-on: https://gerrit.libreoffice.org/66565
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
-rw-r--r-- | vcl/source/window/toolbox.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4d203c6b9186..90bd2622ef87 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2493,8 +2493,10 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tool tools::Polygon aPoly(4); - long width = 7 * fScaleFactor; - long height = 4 * fScaleFactor; + long width = round(rDropDownRect.getHeight()/5.5) * fScaleFactor; // scale triangle depending on theme/toolbar height with 7 for gtk, 5 for gen + long height = round(rDropDownRect.getHeight()/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; |