vcl/source/control/button.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit b3452d3d2db48ca2eb14e74d7ee8ca52944f114c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 20 15:26:03 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 20 22:09:00 2019 +0100 get better optimal size for a radiobutton with an image in it (not an image used as the indicator, which is already covered, but if an image follows the indicator Change-Id: I9e3f9c466d997f91f54912660f8c54eea6deb721 Reviewed-on: https://gerrit.libreoffice.org/68097 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index d4ba23064e03..a737b61abfa6 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -2844,8 +2844,15 @@ Size RadioButton::CalcMinimumSize() const else { aSize = maImage.GetSizePixel(); - aSize.AdjustWidth(8 ); - aSize.AdjustHeight(8 ); + aSize.AdjustWidth(8); + aSize.AdjustHeight(8); + } + + if (Button::HasImage() && !(ImplGetButtonState() & DrawButtonFlags::NoImage)) + { + Size aImgSize = GetModeImage().GetSizePixel(); + aSize = Size(std::max(aImgSize.Width(), aSize.Width()), + std::max(aImgSize.Height(), aSize.Height())); } OUString aText = GetText(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits