diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-07 20:37:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-08 14:45:37 +0100 |
commit | 17224bb22dadb8c6fa1dad32e2d1028bf356f485 (patch) | |
tree | df57e3daba6adf3ed4c7b984161669c3261e05ba /sw | |
parent | 74afdccae5c4ee0f59f1313ea232ac2719e22ac7 (diff) |
tdf#145258 comments cut-off in writer under windows with 125% scaling
Change-Id: Ic255681075e3ff2d80723071d78bdcc64a8d9bb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124829
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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 d914e20d89cb..d42304fa6b0c 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1222,9 +1222,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 |