diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-07 20:37:45 +0000 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-11-11 16:46:15 +0100 |
commit | 7558ef949898e8f41a715ff335871450e3bb1a08 (patch) | |
tree | 115aca164d50f672e32238012efe953fb426cbc3 /sw | |
parent | 62d82a9a4108f715cf1a2bf15205adc28e9fd31a (diff) |
tdf#145258 comments cut-off in writer under windows with 125% scaling
Change-Id: Ic255681075e3ff2d80723071d78bdcc64a8d9bb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124852
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/AnnotationWin2.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 71a78d6fae0e..2ae806b5316b 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1217,9 +1217,17 @@ int SwAnnotationWin::GetPrefScrollbarWidth() const sal_Int32 SwAnnotationWin::GetMetaHeight() const { - const Fraction& f(mrView.GetWrtShellPtr()->GetOut()->GetMapMode().GetScaleY()); const int fields = GetNumFields(); - return tools::Long(fields*POSTIT_META_FIELD_HEIGHT * f); + + const Fraction& f(mrView.GetWrtShellPtr()->GetOut()->GetMapMode().GetScaleY()); + sal_Int32 nClassicHeight(fields * POSTIT_META_FIELD_HEIGHT * f); + + sal_Int32 nRequiredHeight = 0; + weld::Label* aLabels[3] = { mxMetadataAuthor.get(), mxMetadataDate.get(), mxMetadataResolved.get() }; + for (int i = 0; i < fields; ++i) + nRequiredHeight += aLabels[i]->get_preferred_size().Height(); + + return std::max(nClassicHeight, nRequiredHeight); } sal_Int32 SwAnnotationWin::GetNumFields() const |