avoid setting negative window sizes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8536ce5b3f
commit
16eac072eb
@ -637,6 +637,8 @@ wxSize wxRibbonAUIArtProvider::GetPanelClientSize(
|
||||
if(client_offset)
|
||||
*client_offset = wxPoint(3, label_height + 2);
|
||||
}
|
||||
if (size.x < 0) size.x = 0;
|
||||
if (size.y < 0) size.y = 0;
|
||||
return size;
|
||||
}
|
||||
|
||||
|
@ -2446,6 +2446,8 @@ wxSize wxRibbonMSWArtProvider::GetPanelClientSize(
|
||||
else
|
||||
*client_offset = wxPoint(3, 2);
|
||||
}
|
||||
if (size.x < 0) size.x = 0;
|
||||
if (size.y < 0) size.y = 0;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
@ -539,6 +539,7 @@ bool wxRibbonPage::DoActualLayout()
|
||||
minor_axis_size = GetSize().GetWidth() - origin.x - m_art->GetMetric(wxRIBBON_ART_PAGE_BORDER_RIGHT_SIZE);
|
||||
available_space = m_size_in_major_axis_for_children - m_art->GetMetric(wxRIBBON_ART_PAGE_BORDER_BOTTOM_SIZE) - origin.y;
|
||||
}
|
||||
if (minor_axis_size < 0) minor_axis_size = 0;
|
||||
size_t size_index;
|
||||
for(size_index = 0; size_index < m_size_calc_array_size; ++size_index)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user