summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-06-30 16:42:35 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2020-07-01 11:55:51 +0200
commit1eba1c4597f8c2698aa91e2218d8452ad0fbc39c (patch)
tree5180d07fbe70b0789b04eab44ed67eccf83c9577
parent06fb3e7b7f1079c276ad2f048cd94299b4bd7006 (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>
-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 543e1b507c50..02600732c747 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1354,20 +1354,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