Sizing fix in wxRichTextImage::LoadImageCache
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12267,8 +12267,6 @@ bool wxRichTextImage::LoadImageCache(wxDC& dc, wxRichTextDrawingContext& context
|
|||||||
{
|
{
|
||||||
if (buffer)
|
if (buffer)
|
||||||
{
|
{
|
||||||
// Surely margins will already be accounted for?
|
|
||||||
#if 0
|
|
||||||
// Find the actual space available when margin is taken into account
|
// Find the actual space available when margin is taken into account
|
||||||
wxRect marginRect, borderRect, contentRect, paddingRect, outlineRect;
|
wxRect marginRect, borderRect, contentRect, paddingRect, outlineRect;
|
||||||
marginRect = wxRect(0, 0, sz.x, sz.y);
|
marginRect = wxRect(0, 0, sz.x, sz.y);
|
||||||
@@ -12277,7 +12275,7 @@ bool wxRichTextImage::LoadImageCache(wxDC& dc, wxRichTextDrawingContext& context
|
|||||||
buffer->GetBoxRects(dc, buffer, GetParent()->GetParent()->GetAttributes(), marginRect, borderRect, contentRect, paddingRect, outlineRect);
|
buffer->GetBoxRects(dc, buffer, GetParent()->GetParent()->GetAttributes(), marginRect, borderRect, contentRect, paddingRect, outlineRect);
|
||||||
sz = contentRect.GetSize();
|
sz = contentRect.GetSize();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// Use a minimum size to stop images becoming very small
|
// Use a minimum size to stop images becoming very small
|
||||||
parentWidth = wxMax(100, sz.GetWidth());
|
parentWidth = wxMax(100, sz.GetWidth());
|
||||||
parentHeight = wxMax(100, sz.GetHeight());
|
parentHeight = wxMax(100, sz.GetHeight());
|
||||||
|
Reference in New Issue
Block a user