Use wxDefaultCoord instead of explicit -1 value while initializing wxSize and wxPoint variables.

This commit is contained in:
Artur Wieczorek
2015-07-15 21:24:02 +02:00
parent a8bf2abcd0
commit 4398e20655
4 changed files with 7 additions and 7 deletions

View File

@@ -2009,7 +2009,7 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize
wxPoint p(pos.x+sz.x,
pos.y+wxPG_BUTTON_SIZEDEC-wxPG_NAT_BUTTON_BORDER_Y);
wxSize s(25, -1);
wxSize s(25, wxDefaultCoord);
wxButton* but = new wxButton();
but->Create(GetPanel(),wxID_ANY,wxS("..."),p,s,wxWANTS_CHARS);

View File

@@ -1313,7 +1313,7 @@ void wxPropertyGridManager::RecalculatePositions( int width, int height )
#if wxUSE_TOOLBAR
if ( m_pToolbar )
{
m_pToolbar->SetSize(0, 0, width, -1);
m_pToolbar->SetSize(0, 0, width, wxDefaultCoord);
propgridY += m_pToolbar->GetSize().y;
if ( HasExtraStyle(wxPG_EX_TOOLBAR_SEPARATOR) )
@@ -1325,7 +1325,7 @@ void wxPropertyGridManager::RecalculatePositions( int width, int height )
#if wxUSE_HEADERCTRL
if ( m_showHeader )
{
m_pHeaderCtrl->SetSize(0, propgridY, width, -1);
m_pHeaderCtrl->SetSize(0, propgridY, width, wxDefaultCoord);
propgridY += m_pHeaderCtrl->GetSize().y;
}
#endif
@@ -1827,8 +1827,8 @@ void wxPropertyGridManager::SetDescription( const wxString& label, const wxStrin
m_pTxtHelpCaption->SetLabel(label);
m_pTxtHelpContent->SetLabel(content);
m_pTxtHelpCaption->SetSize(-1,osz1.y);
m_pTxtHelpContent->SetSize(-1,osz2.y);
m_pTxtHelpCaption->SetSize(wxDefaultCoord, osz1.y);
m_pTxtHelpContent->SetSize(wxDefaultCoord, osz2.y);
UpdateDescriptionBox( m_splitterY, m_width, m_height );
}

View File

@@ -1312,7 +1312,7 @@ bool wxPGProperty::SetValueFromInt( long number, int argFlags )
wxSize wxPGProperty::OnMeasureImage( int WXUNUSED(item) ) const
{
if ( m_valueBitmap )
return wxSize(m_valueBitmap->GetWidth(),-1);
return wxSize(m_valueBitmap->GetWidth(), wxDefaultCoord);
return wxSize(0,0);
}

View File

@@ -1707,7 +1707,7 @@ wxPoint wxPropertyGrid::GetGoodEditorDialogPosition( wxPGProperty* p,
int x = splitterX;
int y = p->GetY();
wxCHECK_MSG( y >= 0, wxPoint(-1,-1), wxS("invalid y?") );
wxCHECK_MSG( y >= 0, wxDefaultPosition, wxS("invalid y?") );
ImprovedClientToScreen( &x, &y );