[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 2 10:32:11 UTC 2020
vcl/source/window/toolbox.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 2dcae49ad62dc37cd0b11424569d25749669ffa6
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jun 30 16:42:35 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Jul 2 12:31:37 2020 +0200
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 at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97737
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 9f4a33456a4e..9049355609bd 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
More information about the Libreoffice-commits
mailing list