Lower x (or y) value always defines "Start Point".
"End Point" is the other. (The user doesn't care what the variable names in the code are.) Also re-lays-out the dialog for better comprehension. Fixes: lp:1694964 * https://bugs.launchpad.net/kicad/+bug/1694964
This commit is contained in:
parent
044b4a6d4c
commit
807b8d4cf1
|
@ -55,6 +55,8 @@ private:
|
|||
UNIT_BINDER m_bezierCtrl1X, m_bezierCtrl1Y;
|
||||
UNIT_BINDER m_bezierCtrl2X, m_bezierCtrl2Y;
|
||||
|
||||
bool m_flipStartEnd;
|
||||
|
||||
wxFloatingPointValidator<double> m_AngleValidator;
|
||||
double m_AngleValue;
|
||||
|
||||
|
@ -91,6 +93,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES( PCB_BASE_EDIT_FR
|
|||
m_bezierCtrl1Y( aParent, m_BezierPointC1YLabel, m_BezierC1Y_Ctrl, m_BezierPointC1YUnit ),
|
||||
m_bezierCtrl2X( aParent, m_BezierPointC2XLabel, m_BezierC2X_Ctrl, m_BezierPointC2XUnit ),
|
||||
m_bezierCtrl2Y( aParent, m_BezierPointC2YLabel, m_BezierC2Y_Ctrl, m_BezierPointC2YUnit ),
|
||||
m_flipStartEnd( false ),
|
||||
m_AngleValidator( 1, &m_AngleValue ),
|
||||
m_AngleValue( 0.0 )
|
||||
{
|
||||
|
@ -146,8 +149,10 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow()
|
|||
// Only a Bezeier curve has control points. So do not show these parameters for other shapes
|
||||
if( m_item->GetShape() != S_CURVE )
|
||||
{
|
||||
m_bezierCtrlPt1Label->Show( false );
|
||||
m_bezierCtrl1X.Show( false );
|
||||
m_bezierCtrl1Y.Show( false );
|
||||
m_bezierCtrlPt2Label->Show( false );
|
||||
m_bezierCtrl2X.Show( false );
|
||||
m_bezierCtrl2Y.Show( false );
|
||||
}
|
||||
|
@ -157,28 +162,30 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow()
|
|||
{
|
||||
case S_CIRCLE:
|
||||
SetTitle( _( "Circle Properties" ) );
|
||||
m_startXLabel->SetLabel( _( "Center X:" ) );
|
||||
m_startYLabel->SetLabel( _( "Center Y:" ) );
|
||||
m_endXLabel->SetLabel( _( "Radius:" ) );
|
||||
m_startPointLabel->SetLabel( _( "Center" ) );
|
||||
m_endPointLabel->SetLabel( _( "Radius" ) );
|
||||
m_endY.Show( false );
|
||||
break;
|
||||
|
||||
case S_ARC:
|
||||
SetTitle( _( "Arc Properties" ) );
|
||||
m_startXLabel->SetLabel( _( "Center X:" ) );
|
||||
m_startYLabel->SetLabel( _( "Center Y:" ) );
|
||||
m_endXLabel->SetLabel( _( "Start Point X:" ) );
|
||||
m_endYLabel->SetLabel( _( "Start Point Y:" ) );
|
||||
m_startPointLabel->SetLabel( _( "Center" ) );
|
||||
m_endPointLabel->SetLabel( _( "Start Point" ) );
|
||||
|
||||
m_AngleValue = m_item->GetAngle() / 10.0;
|
||||
break;
|
||||
|
||||
case S_POLYGON:
|
||||
SetTitle( _( "Polygon Properties" ) );
|
||||
m_fgUpperLeftGridSizer->Show( false );
|
||||
m_sizerLeft->Show( false );
|
||||
break;
|
||||
|
||||
case S_SEGMENT:
|
||||
if( m_item->GetStart().x == m_item->GetEnd().x )
|
||||
m_flipStartEnd = m_item->GetStart().y > m_item->GetEnd().y;
|
||||
else
|
||||
m_flipStartEnd = m_item->GetStart().x > m_item->GetEnd().x;
|
||||
|
||||
SetTitle( _( "Line Segment Properties" ) );
|
||||
break;
|
||||
|
||||
|
@ -186,13 +193,26 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow()
|
|||
break;
|
||||
}
|
||||
|
||||
if( m_flipStartEnd )
|
||||
{
|
||||
m_startX.SetValue( m_item->GetEnd().x );
|
||||
m_startY.SetValue( m_item->GetEnd().y );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_startX.SetValue( m_item->GetStart().x );
|
||||
m_startY.SetValue( m_item->GetStart().y );
|
||||
}
|
||||
|
||||
if( m_item->GetShape() == S_CIRCLE )
|
||||
{
|
||||
m_endX.SetValue( m_item->GetRadius() );
|
||||
}
|
||||
else if( m_flipStartEnd )
|
||||
{
|
||||
m_endX.SetValue( m_item->GetStart().x );
|
||||
m_endY.SetValue( m_item->GetStart().y );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_endX.SetValue( m_item->GetEnd().x );
|
||||
|
@ -228,13 +248,26 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow()
|
|||
BOARD_COMMIT commit( m_parent );
|
||||
commit.Modify( m_item );
|
||||
|
||||
if( m_flipStartEnd )
|
||||
{
|
||||
m_item->SetEndX( m_startX.GetValue() );
|
||||
m_item->SetEndY( m_startY.GetValue() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_item->SetStartX( m_startX.GetValue() );
|
||||
m_item->SetStartY( m_startY.GetValue() );
|
||||
}
|
||||
|
||||
if( m_item->GetShape() == S_CIRCLE )
|
||||
{
|
||||
m_item->SetEnd( m_item->GetStart() + wxPoint( m_endX.GetValue(), 0 ) );
|
||||
}
|
||||
else if( m_flipStartEnd )
|
||||
{
|
||||
m_item->SetStartX( m_endX.GetValue() );
|
||||
m_item->SetStartY( m_endY.GetValue() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_item->SetEndX( m_endX.GetValue() );
|
||||
|
|
|
@ -19,134 +19,150 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
|
|||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bUpperSizer;
|
||||
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
bUpperSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_fgUpperLeftGridSizer = new wxFlexGridSizer( 8, 3, 0, 0 );
|
||||
m_fgUpperLeftGridSizer->AddGrowableCol( 1 );
|
||||
m_fgUpperLeftGridSizer->SetFlexibleDirection( wxBOTH );
|
||||
m_fgUpperLeftGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
m_sizerLeft = new wxGridBagSizer( 5, 5 );
|
||||
m_sizerLeft->SetFlexibleDirection( wxBOTH );
|
||||
m_sizerLeft->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
m_sizerLeft->SetEmptyCellSize( wxSize( 5,5 ) );
|
||||
|
||||
m_startXLabel = new wxStaticText( this, wxID_ANY, _("Start point X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startPointLabel = new wxStaticText( this, wxID_ANY, _("Start Point"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startPointLabel->Wrap( -1 );
|
||||
m_sizerLeft->Add( m_startPointLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
|
||||
|
||||
m_startXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startXLabel->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_startXLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
|
||||
m_sizerLeft->Add( m_startXLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_startXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fgUpperLeftGridSizer->Add( m_startXCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
|
||||
m_sizerLeft->Add( m_startXCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_startXUnits = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startXUnits->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_startXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
m_sizerLeft->Add( m_startXUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 15 );
|
||||
|
||||
m_startYLabel = new wxStaticText( this, wxID_ANY, _("Start point Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startYLabel->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_startYLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
|
||||
m_sizerLeft->Add( m_startYLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_startYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fgUpperLeftGridSizer->Add( m_startYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
|
||||
m_sizerLeft->Add( m_startYCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_startYUnits = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_startYUnits->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_startYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
m_sizerLeft->Add( m_startYUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 15 );
|
||||
|
||||
m_endXLabel = new wxStaticText( this, wxID_ANY, _("End point X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endPointLabel = new wxStaticText( this, wxID_ANY, _("End Point"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endPointLabel->Wrap( -1 );
|
||||
m_sizerLeft->Add( m_endPointLabel, wxGBPosition( 0, 3 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
|
||||
|
||||
m_endXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endXLabel->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_endXLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
|
||||
m_sizerLeft->Add( m_endXLabel, wxGBPosition( 1, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_endXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fgUpperLeftGridSizer->Add( m_endXCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
|
||||
m_sizerLeft->Add( m_endXCtrl, wxGBPosition( 1, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_endXUnits = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endXUnits->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_endXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
m_sizerLeft->Add( m_endXUnits, wxGBPosition( 1, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_endYLabel = new wxStaticText( this, wxID_ANY, _("End point Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endYLabel->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_endYLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
|
||||
m_sizerLeft->Add( m_endYLabel, wxGBPosition( 2, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_endYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fgUpperLeftGridSizer->Add( m_endYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
|
||||
m_sizerLeft->Add( m_endYCtrl, wxGBPosition( 2, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_endYUnits = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_endYUnits->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_endYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
m_sizerLeft->Add( m_endYUnits, wxGBPosition( 2, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_BezierPointC1XLabel = new wxStaticText( this, wxID_ANY, _("Bezier point C1 X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bezierCtrlPt1Label = new wxStaticText( this, wxID_ANY, _("Bezier Control Pt"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bezierCtrlPt1Label->Wrap( -1 );
|
||||
m_sizerLeft->Add( m_bezierCtrlPt1Label, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
|
||||
|
||||
m_BezierPointC1XLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC1XLabel->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierPointC1XLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
m_sizerLeft->Add( m_BezierPointC1XLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_BezierC1X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierC1X_Ctrl, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
|
||||
m_sizerLeft->Add( m_BezierC1X_Ctrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_BezierPointC1XUnit = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC1XUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC1XUnit->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierPointC1XUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_sizerLeft->Add( m_BezierPointC1XUnit, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_BezierPointC1YLabel = new wxStaticText( this, wxID_ANY, _("Bezier point C1 Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC1YLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC1YLabel->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierPointC1YLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
m_sizerLeft->Add( m_BezierPointC1YLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_BezierC1Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierC1Y_Ctrl, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
|
||||
m_sizerLeft->Add( m_BezierC1Y_Ctrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_BezierPointC1YUnit = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC1YUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC1YUnit->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierPointC1YUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_sizerLeft->Add( m_BezierPointC1YUnit, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_BezierPointC2XLabel = new wxStaticText( this, wxID_ANY, _("Bezier point C2 X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bezierCtrlPt2Label = new wxStaticText( this, wxID_ANY, _("Bezier Control Pt"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bezierCtrlPt2Label->Wrap( -1 );
|
||||
m_sizerLeft->Add( m_bezierCtrlPt2Label, wxGBPosition( 4, 3 ), wxGBSpan( 1, 3 ), wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_BezierPointC2XLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC2XLabel->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierPointC2XLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
m_sizerLeft->Add( m_BezierPointC2XLabel, wxGBPosition( 5, 3 ), wxGBSpan( 1, 1 ), wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_BezierC2X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierC2X_Ctrl, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
|
||||
m_sizerLeft->Add( m_BezierC2X_Ctrl, wxGBPosition( 5, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_BezierPointC2XUnit = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC2XUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC2XUnit->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierPointC2XUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_sizerLeft->Add( m_BezierPointC2XUnit, wxGBPosition( 5, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_BezierPointC2YLabel = new wxStaticText( this, wxID_ANY, _("Bezier point C2 Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC2YLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC2YLabel->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierPointC2YLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
m_sizerLeft->Add( m_BezierPointC2YLabel, wxGBPosition( 6, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_BezierC2Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierC2Y_Ctrl, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
|
||||
m_sizerLeft->Add( m_BezierC2Y_Ctrl, wxGBPosition( 6, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_BezierPointC2YUnit = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC2YUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_BezierPointC2YUnit->Wrap( -1 );
|
||||
m_fgUpperLeftGridSizer->Add( m_BezierPointC2YUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_sizerLeft->Add( m_BezierPointC2YUnit, wxGBPosition( 6, 5 ), wxGBSpan( 1, 1 ), wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bUpperSizer->Add( m_fgUpperLeftGridSizer, 1, wxEXPAND|wxRIGHT, 30 );
|
||||
bUpperSizer->Add( m_sizerLeft, 1, wxEXPAND|wxBOTTOM, 20 );
|
||||
|
||||
wxBoxSizer* bUpperRightSizer;
|
||||
bUpperRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgUpperRightGridSizer;
|
||||
fgUpperRightGridSizer = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgUpperRightGridSizer = new wxFlexGridSizer( 0, 3, 5, 0 );
|
||||
fgUpperRightGridSizer->AddGrowableCol( 1 );
|
||||
fgUpperRightGridSizer->SetFlexibleDirection( wxBOTH );
|
||||
fgUpperRightGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_angleLabel = new wxStaticText( this, wxID_ANY, _("Arc angle:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_angleLabel->Wrap( -1 );
|
||||
fgUpperRightGridSizer->Add( m_angleLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
|
||||
fgUpperRightGridSizer->Add( m_angleLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
|
||||
|
||||
m_angleCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgUpperRightGridSizer->Add( m_angleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
|
||||
fgUpperRightGridSizer->Add( m_angleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_angleUnits = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_angleUnits->Wrap( -1 );
|
||||
fgUpperRightGridSizer->Add( m_angleUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgUpperRightGridSizer->Add( m_angleUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
|
||||
|
||||
m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Line thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_thicknessLabel->Wrap( -1 );
|
||||
fgUpperRightGridSizer->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgUpperRightGridSizer->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
|
||||
|
||||
m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgUpperRightGridSizer->Add( m_thicknessCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
|
||||
fgUpperRightGridSizer->Add( m_thicknessCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_thicknessUnits->Wrap( -1 );
|
||||
fgUpperRightGridSizer->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgUpperRightGridSizer->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
|
||||
|
||||
m_LayerLabel = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_LayerLabel->Wrap( -1 );
|
||||
|
@ -165,7 +181,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
|
|||
bUpperSizer->Add( bUpperRightSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxALL, 10 );
|
||||
bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,8 +21,9 @@ class PCB_LAYER_BOX_SELECTOR;
|
|||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/bmpcbox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
@ -38,25 +39,29 @@ class DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
private:
|
||||
|
||||
protected:
|
||||
wxFlexGridSizer* m_fgUpperLeftGridSizer;
|
||||
wxGridBagSizer* m_sizerLeft;
|
||||
wxStaticText* m_startPointLabel;
|
||||
wxStaticText* m_startXLabel;
|
||||
wxTextCtrl* m_startXCtrl;
|
||||
wxStaticText* m_startXUnits;
|
||||
wxStaticText* m_startYLabel;
|
||||
wxTextCtrl* m_startYCtrl;
|
||||
wxStaticText* m_startYUnits;
|
||||
wxStaticText* m_endPointLabel;
|
||||
wxStaticText* m_endXLabel;
|
||||
wxTextCtrl* m_endXCtrl;
|
||||
wxStaticText* m_endXUnits;
|
||||
wxStaticText* m_endYLabel;
|
||||
wxTextCtrl* m_endYCtrl;
|
||||
wxStaticText* m_endYUnits;
|
||||
wxStaticText* m_bezierCtrlPt1Label;
|
||||
wxStaticText* m_BezierPointC1XLabel;
|
||||
wxTextCtrl* m_BezierC1X_Ctrl;
|
||||
wxStaticText* m_BezierPointC1XUnit;
|
||||
wxStaticText* m_BezierPointC1YLabel;
|
||||
wxTextCtrl* m_BezierC1Y_Ctrl;
|
||||
wxStaticText* m_BezierPointC1YUnit;
|
||||
wxStaticText* m_bezierCtrlPt2Label;
|
||||
wxStaticText* m_BezierPointC2XLabel;
|
||||
wxTextCtrl* m_BezierC2X_Ctrl;
|
||||
wxStaticText* m_BezierPointC2XUnit;
|
||||
|
|
Loading…
Reference in New Issue