Kaydet (Commit) b56ad2a1 authored tarafından heiko tietze's avatar heiko tietze Kaydeden (comit) Heiko Tietze

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: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
üst dcf185ea
...@@ -2492,9 +2492,12 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tool ...@@ -2492,9 +2492,12 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tool
float fScaleFactor = rRenderContext.GetDPIScaleFactor(); float fScaleFactor = rRenderContext.GetDPIScaleFactor();
tools::Polygon aPoly(4); tools::Polygon aPoly(4);
int iTBHeight = rRenderContext.GetOutputSize().Height(); //scale triangle depending on theme/toolbar height
long width = 7 * fScaleFactor; long width = round(iTBHeight/5.5) * fScaleFactor; // 7 for gtk, 5 for gen
long height = 4 * fScaleFactor; 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 x = rDropDownRect.Left() + (rDropDownRect.getWidth() - width)/2;
long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2; long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment