fix a couple GTK assertions about setting negative sizes, closes #15891
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6286f9b1ef
commit
eb1f6dd806
@ -1354,9 +1354,11 @@ void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust
|
||||
else
|
||||
{
|
||||
// If it has border, have textctrl fill the entire text field.
|
||||
int w = m_tcArea.width - m_widthCustomPaint;
|
||||
if (w < 0) w = 0;
|
||||
m_text->SetSize( m_tcArea.x + m_widthCustomPaint,
|
||||
m_tcArea.y,
|
||||
m_tcArea.width - m_widthCustomPaint,
|
||||
w,
|
||||
m_tcArea.height );
|
||||
}
|
||||
}
|
||||
|
@ -271,7 +271,9 @@ void wxCollapsiblePane::OnSize(wxSizeEvent &ev)
|
||||
|
||||
// here we need to resize the pane window otherwise, even if the GtkExpander container
|
||||
// is expanded or shrunk, the pane window won't be updated!
|
||||
m_pPane->SetSize(ev.GetSize().x, ev.GetSize().y - m_szCollapsed.y);
|
||||
int w = ev.GetSize().y - m_szCollapsed.y;
|
||||
if (w < 0) w = 0;
|
||||
m_pPane->SetSize(ev.GetSize().x, w);
|
||||
|
||||
// we need to explicitly call m_pPane->Layout() or else it won't correctly relayout
|
||||
// (even if SetAutoLayout(true) has been called on it!)
|
||||
|
Loading…
Reference in New Issue
Block a user