diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-08-25 18:01:32 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-08-28 16:27:03 +0200 |
commit | 093e49e521ed051641f57273ac7f4d526a511c57 (patch) | |
tree | ae1f19689ac88ac5ca4e18fbb04c3b3b34329092 /svx | |
parent | b4942bb54624569fab0ab4b24d4ae6f41d2cf68d (diff) |
jsdialog: render font previews with hidpi
we pass dpi scale, let's use it to determine combobox entry size
Change-Id: I4088eca565b301c5693e52b1c05af1a335fc34fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156115
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 71da54267427..2eda9b2be745 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -900,6 +900,8 @@ SvxStyleBox_Base::SvxStyleBox_Base(std::unique_ptr<weld::ComboBox> xWidget, IMPL_LINK(SvxStyleBox_Base, CustomGetSizeHdl, OutputDevice&, rArg, Size) { CalcOptimalExtraUserWidth(rArg); + if (comphelper::LibreOfficeKit::isActive()) + return Size(m_nMaxUserDrawFontWidth * rArg.GetDPIX() / 96, ITEM_HEIGHT * rArg.GetDPIY() / 96); return Size(m_nMaxUserDrawFontWidth, ITEM_HEIGHT); } |