summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-06-30 16:42:35 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-08 02:31:11 +0200
commit9921be1f47943781c443927f7c7d94a460f2780b (patch)
treea8d803273b4b0652a639d396e9436433734116bc /vcl/source
parentf1b1be9e3707b2e25557f4f781e3321051018683 (diff)
tdf#130991 Scale the drop-down arrow size-request
When requesting the size of the drop-down arrow button, the arrow rect must be scaled, like all other native size requests. Change-Id: Ic0ccd96e812527c880868d385484655526ebb09b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97536 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit ba956e60a868e98d22bc95efd041f423987e7f76) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97576 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit f0daeb39aa61cc3435630cf0b9727f6da818de1a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97679 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/toolbox.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index df5aadf89243..187ea2512f98 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1352,20 +1352,22 @@ static void ImplAddButtonBorder( long &rWidth, long& rHeight, bool bNativeButton
bool ToolBox::ImplCalcItem()
{
-
// recalc required ?
if ( !mbCalc )
return false;
ImplDisableFlatButtons();
+ OutputDevice *pDefault = Application::GetDefaultDevice();
+ float fScaleFactor = pDefault ? pDefault->GetDPIScaleFactor() : 1.0;
+
long nDefWidth;
long nDefHeight;
long nMaxWidth = 0;
long nMaxHeight = 0;
long nMinWidth = 6;
long nMinHeight = 6;
- long nDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
+ long nDropDownArrowWidth = TB_DROPDOWNARROWWIDTH * fScaleFactor;
#ifdef IOS
nDropDownArrowWidth *= 3;
#endif