Kaydet (Commit) b3452d3d authored tarafından Caolán McNamara's avatar Caolán McNamara

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/68097Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0f3b53a1
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment