summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-08-25 18:01:32 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2023-08-31 10:15:45 +0200
commit3fad74eb9def27788faddd74f5285120e0aefdd9 (patch)
tree6268c8401e3e375e51ebc5715d7b6899185678fc /svx/source
parenteecf74196b852cddaaffbf7e0442fd2abbc36a5d (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156251 Tested-by: Jenkins
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 0d862f8964f8..9fdb74a73c21 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -899,6 +899,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);
}