Correct bug in the wxSpinCtrlGeneric sub-controls resizing.
The code in DoMoveWindow() didn't account for the margin and made the text control part of the window too large resulting in the truncation of the spin button. Simply remember to take margin into account when computing the text width. See #12767. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -270,7 +270,7 @@ void wxSpinCtrlGenericBase::DoMoveWindow(int x, int y, int width, int height)
|
||||
// position the subcontrols inside the client area
|
||||
wxSize sizeBtn = m_spinButton->GetSize();
|
||||
|
||||
wxCoord wText = width - sizeBtn.x;
|
||||
wxCoord wText = width - sizeBtn.x - MARGIN;
|
||||
m_textCtrl->SetSize(x, y, wText, height);
|
||||
m_spinButton->SetSize(x + wText + MARGIN, y, wxDefaultCoord, height);
|
||||
}
|
||||
|
Reference in New Issue
Block a user