diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-04-07 00:07:53 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-04-07 01:27:51 +0200 |
commit | ea4fb1559f7b99a0bfaf18f26cb3b6972c9cde1c (patch) | |
tree | a87863483d5df008817658ead518b52a2584876d /vcl/inc/salvtables.hxx | |
parent | 4d4fd4cc57a37a5f24178cf8bac63d979f4323da (diff) |
tdf#136918 restrict symbol size to button width
... and scale the button based on the DPI scaling factor.
The symbol size is based on pDev->GetTextHeight(), but the button
itself is fixed to 20px, which would break at some point. So this
at least scales the button witdh based on DPI, just like commit
1eba1c4597f8c2698aa91e2218d8452ad0fbc39c ("tdf#130991 Scale the
drop-down arrow size-request") did for the toolbar buttons.
OTOH this should probably just use the full button width ignoring
the GetTextHeight()...
Change-Id: I43010443265c10ad92f46cdecd1d7155a7a07a3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113710
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/salvtables.hxx')
-rw-r--r-- | vcl/inc/salvtables.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 60041654521f..b0c04b5b1f0b 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -845,8 +845,8 @@ public: int get_menu_button_width() const override { - const int nButtonWidth = 20; - return nButtonWidth; + OutputDevice* pDefault = Application::GetDefaultDevice(); + return 20 * (pDefault ? pDefault->GetDPIScaleFactor() : 1.0); } void CallHandleEventListener(VclWindowEvent& rEvent) |