Rationalize negative line-width handling.
Make "don't stroke" an explicit property in the GUI. Silently enforce line width to >= 0 when stroking. Make layouts between dialogs more consistent. Interpret unspecified fill colour as layer colour. Fixes https://gitlab.com/kicad/code/kicad/issues/11279
This commit is contained in:
parent
a9c61d21ca
commit
06df90636b
|
@ -128,10 +128,21 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow()
|
|||
m_bold->Check( m_currentText->IsBold() );
|
||||
m_italic->Check( m_currentText->IsItalic() );
|
||||
|
||||
m_borderCheckbox->SetValue( m_currentText->GetWidth() >= 0 );
|
||||
|
||||
if( m_currentText->GetWidth() >= 0 )
|
||||
{
|
||||
m_borderCheckbox->SetValue( true );
|
||||
m_borderWidth.SetValue( m_currentText->GetWidth() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_borderCheckbox->SetValue( false );
|
||||
|
||||
m_borderWidth.Enable( false );
|
||||
m_borderColorLabel->Enable( false );
|
||||
m_borderColorSwatch->Enable( false );
|
||||
m_borderStyleLabel->Enable( false );
|
||||
m_borderStyleCombo->Enable( false );
|
||||
}
|
||||
|
||||
m_borderColorSwatch->SetSwatchColor( m_currentText->GetStroke().GetColor(), false );
|
||||
|
||||
|
@ -144,12 +155,6 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow()
|
|||
else
|
||||
wxFAIL_MSG( "Line type not found in the type lookup map" );
|
||||
|
||||
m_borderWidth.Enable( m_currentText->GetWidth() >= 0 );
|
||||
m_borderColorLabel->Enable( m_currentText->GetWidth() >= 0 );
|
||||
m_borderColorSwatch->Enable( m_currentText->GetWidth() >= 0 );
|
||||
m_borderStyleLabel->Enable( m_currentText->GetWidth() >= 0 );
|
||||
m_borderStyleCombo->Enable( m_currentText->GetWidth() >= 0 );
|
||||
|
||||
m_filledCtrl->SetValue( m_currentText->IsFilled() );
|
||||
m_fillColorSwatch->SetSwatchColor( m_currentText->GetFillColor(), false );
|
||||
|
||||
|
@ -198,10 +203,6 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow()
|
|||
if( !wxDialog::TransferDataFromWindow() )
|
||||
return false;
|
||||
|
||||
// Don't allow text to disappear; it can be difficult to correct if you can't select it
|
||||
if( !m_textSize.Validate( 0.01, 1000.0, EDA_UNITS::MILLIMETRES ) )
|
||||
return false;
|
||||
|
||||
wxString text = m_textCtrl->GetValue();
|
||||
|
||||
#ifdef __WXMAC__
|
||||
|
@ -274,14 +275,9 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow()
|
|||
STROKE_PARAMS stroke = m_currentText->GetStroke();
|
||||
|
||||
if( m_borderCheckbox->GetValue() )
|
||||
{
|
||||
if( !m_borderWidth.IsIndeterminate() )
|
||||
stroke.SetWidth( m_borderWidth.GetValue() );
|
||||
}
|
||||
stroke.SetWidth( std::max( (long long int) 0, m_borderWidth.GetValue() ) );
|
||||
else
|
||||
{
|
||||
stroke.SetWidth( -1 );
|
||||
}
|
||||
|
||||
auto it = lineTypeNames.begin();
|
||||
std::advance( it, m_borderStyleCombo->GetSelection() );
|
||||
|
|
|
@ -135,7 +135,7 @@ bool DIALOG_LINE_PROPERTIES::TransferDataFromWindow()
|
|||
for( SCH_LINE* line : m_lines )
|
||||
{
|
||||
if( !m_width.IsIndeterminate() )
|
||||
line->SetLineWidth( m_width.GetValue() );
|
||||
line->SetLineWidth( std::max( (long long int) 0, m_width.GetValue() ) );
|
||||
|
||||
auto it = lineTypeNames.begin();
|
||||
std::advance( it, m_typeCombo->GetSelection() );
|
||||
|
|
|
@ -23,27 +23,27 @@ DIALOG_LINE_PROPERTIES_BASE::DIALOG_LINE_PROPERTIES_BASE( wxWindow* parent, wxWi
|
|||
mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerGeneral;
|
||||
fgSizerGeneral = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerGeneral = new wxFlexGridSizer( 0, 3, 3, 0 );
|
||||
fgSizerGeneral->AddGrowableCol( 1 );
|
||||
fgSizerGeneral->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerGeneral->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticTextWidth = new wxStaticText( this, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextWidth->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_staticTextWidth, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
fgSizerGeneral->Add( m_staticTextWidth, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
||||
|
||||
m_lineWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
fgSizerGeneral->Add( m_lineWidth, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
fgSizerGeneral->Add( m_lineWidth, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 3 );
|
||||
|
||||
m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticWidthUnits->Wrap( -1 );
|
||||
m_staticWidthUnits->SetMinSize( wxSize( 40,-1 ) );
|
||||
|
||||
fgSizerGeneral->Add( m_staticWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
fgSizerGeneral->Add( m_staticWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
||||
|
||||
m_staticTextColor = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextColor->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_staticTextColor, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerGeneral->Add( m_staticTextColor, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer2;
|
||||
|
@ -56,30 +56,36 @@ DIALOG_LINE_PROPERTIES_BASE::DIALOG_LINE_PROPERTIES_BASE( wxWindow* parent, wxWi
|
|||
m_panel1->SetSizer( bSizer2 );
|
||||
m_panel1->Layout();
|
||||
bSizer2->Fit( m_panel1 );
|
||||
fgSizerGeneral->Add( m_panel1, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 2 );
|
||||
fgSizerGeneral->Add( m_panel1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticTextStyle = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextStyle->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_staticTextStyle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerGeneral->Add( m_staticTextStyle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_typeCombo = new wxBitmapComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
|
||||
m_typeCombo->SetMinSize( wxSize( 240,-1 ) );
|
||||
|
||||
fgSizerGeneral->Add( m_typeCombo, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
fgSizerGeneral->Add( m_typeCombo, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 3 );
|
||||
|
||||
|
||||
mainSizer->Add( fgSizerGeneral, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 10 );
|
||||
|
||||
m_helpLabel1 = new wxStaticText( this, wxID_ANY, _("Set width to 0 to use Schematic default line width."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_helpLabel1->Wrap( 333 );
|
||||
mainSizer->Add( m_helpLabel1, 0, wxRIGHT|wxLEFT, 10 );
|
||||
wxBoxSizer* bSizer3;
|
||||
bSizer3 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_helpLabel1 = new wxStaticText( this, wxID_ANY, _("Set width to 0 to use schematic default line width."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_helpLabel1->Wrap( -1 );
|
||||
bSizer3->Add( m_helpLabel1, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_helpLabel2 = new wxStaticText( this, wxID_ANY, _("Set color to transparent to use Schematic Editor colors."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_helpLabel2->Wrap( -1 );
|
||||
mainSizer->Add( m_helpLabel2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
bSizer3->Add( m_helpLabel2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
mainSizer->Add( bSizer3, 0, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
mainSizer->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
|
|
@ -73,10 +73,10 @@
|
|||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="vgap">0</property>
|
||||
<property name="vgap">3</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -137,7 +137,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -201,7 +201,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -262,7 +262,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -323,7 +323,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">2</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -458,7 +458,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -519,7 +519,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapComboBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -585,125 +585,136 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Set width to 0 to use Schematic default line width.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_helpLabel1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">333</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Set color to transparent to use Schematic Editor colors.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_helpLabel2</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Set width to 0 to use schematic default line width.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_helpLabel1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Set color to transparent to use Schematic Editor colors.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_helpLabel2</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -32,21 +32,21 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_S
|
|||
DIALOG_SHAPE_PROPERTIES_BASE( aParent ),
|
||||
m_frame( aParent ),
|
||||
m_shape( aShape ),
|
||||
m_lineWidth( aParent, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits, true )
|
||||
m_borderWidth( aParent, m_borderWidthLabel, m_borderWidthCtrl, m_borderWidthUnits, true )
|
||||
{
|
||||
SetTitle( wxString::Format( GetTitle(), aShape->ShowShape() ) );
|
||||
|
||||
m_helpLabel1->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||
m_helpLabel2->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||
|
||||
SetInitialFocus( m_lineWidthCtrl );
|
||||
SetInitialFocus( m_borderWidthCtrl );
|
||||
|
||||
m_lineColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||
|
||||
for( const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry : lineTypeNames )
|
||||
m_lineStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
||||
m_borderStyleCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
|
||||
|
||||
m_lineStyleCombo->Append( DEFAULT_STYLE );
|
||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||
|
||||
m_fillColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||
|
||||
|
@ -68,15 +68,30 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataToWindow()
|
|||
if( !wxDialog::TransferDataToWindow() )
|
||||
return false;
|
||||
|
||||
m_lineWidth.SetValue( m_shape->GetWidth() );
|
||||
m_lineColorSwatch->SetSwatchColor( m_shape->GetStroke().GetColor(), false );
|
||||
if( m_shape->GetWidth() >= 0 )
|
||||
{
|
||||
m_borderCheckbox->SetValue( true );
|
||||
m_borderWidth.SetValue( m_shape->GetWidth() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_borderCheckbox->SetValue( false );
|
||||
|
||||
m_borderWidth.Enable( false );
|
||||
m_borderColorLabel->Enable( false );
|
||||
m_borderColorSwatch->Enable( false );
|
||||
m_borderStyleLabel->Enable( false );
|
||||
m_borderStyleCombo->Enable( false );
|
||||
}
|
||||
|
||||
m_borderColorSwatch->SetSwatchColor( m_shape->GetStroke().GetColor(), false );
|
||||
|
||||
int style = static_cast<int>( m_shape->GetStroke().GetPlotStyle() );
|
||||
|
||||
if( style == -1 )
|
||||
m_lineStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
||||
m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE );
|
||||
else if( style < (int) lineTypeNames.size() )
|
||||
m_lineStyleCombo->SetSelection( style );
|
||||
m_borderStyleCombo->SetSelection( style );
|
||||
else
|
||||
wxFAIL_MSG( "Line type not found in the type lookup map" );
|
||||
|
||||
|
@ -87,6 +102,30 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataToWindow()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_SHAPE_PROPERTIES::onBorderChecked( wxCommandEvent& event )
|
||||
{
|
||||
bool border = m_borderCheckbox->GetValue();
|
||||
|
||||
if( border && m_borderWidth.GetValue() < 0 )
|
||||
m_borderWidth.SetValue( Mils2iu( m_frame->eeconfig()->m_Drawing.default_line_thickness ) );
|
||||
|
||||
m_borderWidth.Enable( border );
|
||||
m_borderColorLabel->Enable( border );
|
||||
m_borderColorSwatch->Enable( border );
|
||||
m_borderStyleLabel->Enable( border );
|
||||
m_borderStyleCombo->Enable( border );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SHAPE_PROPERTIES::onFillChecked( wxCommandEvent& aEvent )
|
||||
{
|
||||
bool fill = m_filledCtrl->GetValue();
|
||||
|
||||
m_fillColorLabel->Enable( fill );
|
||||
m_fillColorSwatch->Enable( fill );
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
if( !wxDialog::TransferDataFromWindow() )
|
||||
|
@ -100,18 +139,20 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow()
|
|||
|
||||
STROKE_PARAMS stroke = m_shape->GetStroke();
|
||||
|
||||
if( !m_lineWidth.IsIndeterminate() )
|
||||
stroke.SetWidth( m_lineWidth.GetValue() );
|
||||
if( m_borderCheckbox->GetValue() )
|
||||
stroke.SetWidth( std::max( (long long int) 0, m_borderWidth.GetValue() ) );
|
||||
else
|
||||
stroke.SetWidth( -1 );
|
||||
|
||||
auto it = lineTypeNames.begin();
|
||||
std::advance( it, m_lineStyleCombo->GetSelection() );
|
||||
std::advance( it, m_borderStyleCombo->GetSelection() );
|
||||
|
||||
if( it == lineTypeNames.end() )
|
||||
stroke.SetPlotStyle( PLOT_DASH_TYPE::DEFAULT );
|
||||
else
|
||||
stroke.SetPlotStyle( it->first );
|
||||
|
||||
stroke.SetColor( m_lineColorSwatch->GetSwatchColor() );
|
||||
stroke.SetColor( m_borderColorSwatch->GetSwatchColor() );
|
||||
|
||||
m_shape->SetStroke( stroke );
|
||||
|
||||
|
|
|
@ -41,10 +41,14 @@ public:
|
|||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
private:
|
||||
void onBorderChecked( wxCommandEvent& aEvent) override;
|
||||
void onFillChecked( wxCommandEvent& aEvent ) override;
|
||||
|
||||
private:
|
||||
SCH_EDIT_FRAME* m_frame;
|
||||
SCH_SHAPE* m_shape;
|
||||
UNIT_BINDER m_lineWidth;
|
||||
UNIT_BINDER m_borderWidth;
|
||||
};
|
||||
|
||||
#endif // DIALOG_SHAPE_PROPERTIES_H
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE( DIALOG_SHAPE_PROPERTIES_BASE, DIALOG_SHIM )
|
||||
EVT_CHECKBOX( wxID_ANY, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_onBorderChecked )
|
||||
EVT_CHECKBOX( wxID_ANY, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_onFillChecked )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
@ -26,105 +31,107 @@ DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wx
|
|||
|
||||
mainSizer->Add( m_infoBar, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizerGeneral;
|
||||
fgSizerGeneral = new wxFlexGridSizer( 0, 3, 7, 0 );
|
||||
fgSizerGeneral->AddGrowableCol( 1 );
|
||||
fgSizerGeneral->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerGeneral->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
m_textEntrySizer = new wxGridBagSizer( 3, 3 );
|
||||
m_textEntrySizer->SetFlexibleDirection( wxBOTH );
|
||||
m_textEntrySizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
m_textEntrySizer->SetEmptyCellSize( wxSize( 36,-1 ) );
|
||||
|
||||
m_lineWidthLabel = new wxStaticText( this, wxID_ANY, _("Line width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthLabel->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_lineWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
||||
m_borderCheckbox = new wxCheckBox( this, wxID_ANY, _("Border"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textEntrySizer->Add( m_borderCheckbox, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM, 2 );
|
||||
|
||||
m_lineWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
fgSizerGeneral->Add( m_lineWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 3 );
|
||||
m_borderWidthLabel = new wxStaticText( this, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_borderWidthLabel->Wrap( -1 );
|
||||
m_textEntrySizer->Add( m_borderWidthLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_lineWidthUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthUnits->Wrap( -1 );
|
||||
m_lineWidthUnits->SetMinSize( wxSize( 40,-1 ) );
|
||||
wxBoxSizer* bSizer7;
|
||||
bSizer7 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
fgSizerGeneral->Add( m_lineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
||||
m_borderWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
bSizer7->Add( m_borderWidthCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_lineColorLabel = new wxStaticText( this, wxID_ANY, _("Line color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineColorLabel->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_lineColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
m_borderWidthUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_borderWidthUnits->Wrap( -1 );
|
||||
bSizer7->Add( m_borderWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
|
||||
|
||||
m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer2;
|
||||
bSizer2 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_lineColorSwatch = new COLOR_SWATCH( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer2->Add( m_lineColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
m_borderColorLabel = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_borderColorLabel->Wrap( -1 );
|
||||
bSizer7->Add( m_borderColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
|
||||
|
||||
|
||||
m_panel1->SetSizer( bSizer2 );
|
||||
m_panel1->Layout();
|
||||
bSizer2->Fit( m_panel1 );
|
||||
fgSizerGeneral->Add( m_panel1, 0, wxALIGN_CENTER_VERTICAL, 2 );
|
||||
bSizer7->Add( 5, 0, 0, 0, 5 );
|
||||
|
||||
m_panelBorderColor = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer23;
|
||||
bSizer23 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_borderColorSwatch = new COLOR_SWATCH( m_panelBorderColor, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer23->Add( m_borderColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_lineStyleLabel = new wxStaticText( this, wxID_ANY, _("Line style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineStyleLabel->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_lineStyleLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_lineStyleCombo = new wxBitmapComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
|
||||
m_lineStyleCombo->SetMinSize( wxSize( 240,-1 ) );
|
||||
|
||||
fgSizerGeneral->Add( m_lineStyleCombo, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 3 );
|
||||
m_panelBorderColor->SetSizer( bSizer23 );
|
||||
m_panelBorderColor->Layout();
|
||||
bSizer23->Fit( m_panelBorderColor );
|
||||
bSizer7->Add( m_panelBorderColor, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
m_textEntrySizer->Add( bSizer7, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
|
||||
|
||||
m_borderStyleLabel = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_borderStyleLabel->Wrap( -1 );
|
||||
m_textEntrySizer->Add( m_borderStyleLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
m_borderStyleCombo = new wxBitmapComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
|
||||
m_borderStyleCombo->SetMinSize( wxSize( 240,-1 ) );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
m_textEntrySizer->Add( m_borderStyleCombo, wxGBPosition( 2, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_filledCtrl = new wxCheckBox( this, wxID_ANY, _("Filled shape"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerGeneral->Add( m_filledCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_textEntrySizer->Add( m_filledCtrl, wxGBPosition( 0, 5 ), wxGBSpan( 1, 2 ), wxRIGHT, 80 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_fillColorLabel = new wxStaticText( this, wxID_ANY, _("Fill color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fillColorLabel->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_fillColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
bSizer8->Add( m_fillColorLabel, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_panel11 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer21;
|
||||
bSizer21 = new wxBoxSizer( wxVERTICAL );
|
||||
m_panelFillColor = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer211;
|
||||
bSizer211 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_fillColorSwatch = new COLOR_SWATCH( m_panel11, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer21->Add( m_fillColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
m_fillColorSwatch = new COLOR_SWATCH( m_panelFillColor, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer211->Add( m_fillColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
|
||||
m_panel11->SetSizer( bSizer21 );
|
||||
m_panel11->Layout();
|
||||
bSizer21->Fit( m_panel11 );
|
||||
fgSizerGeneral->Add( m_panel11, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_panelFillColor->SetSizer( bSizer211 );
|
||||
m_panelFillColor->Layout();
|
||||
bSizer211->Fit( m_panelFillColor );
|
||||
bSizer8->Add( m_panelFillColor, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
mainSizer->Add( fgSizerGeneral, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 10 );
|
||||
m_textEntrySizer->Add( bSizer8, wxGBPosition( 1, 5 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
|
||||
|
||||
m_helpLabel1 = new wxStaticText( this, wxID_ANY, _("Set line width to 0 to use Schematic Editor line widths."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_helpLabel1->Wrap( 333 );
|
||||
mainSizer->Add( m_helpLabel1, 0, wxTOP|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_helpLabel2 = new wxStaticText( this, wxID_ANY, _("Set line color to transparent to use Schematic Editor colors."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textEntrySizer->AddGrowableCol( 3 );
|
||||
|
||||
mainSizer->Add( m_textEntrySizer, 0, wxEXPAND|wxALL, 15 );
|
||||
|
||||
wxBoxSizer* bSizer12;
|
||||
bSizer12 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_helpLabel1 = new wxStaticText( this, wxID_ANY, _("Set border width to 0 to use Schematic Editor default line width."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_helpLabel1->Wrap( -1 );
|
||||
bSizer12->Add( m_helpLabel1, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 10 );
|
||||
|
||||
m_helpLabel2 = new wxStaticText( this, wxID_ANY, _("Set colors to transparent to use Schematic Editor colors."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_helpLabel2->Wrap( -1 );
|
||||
mainSizer->Add( m_helpLabel2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
bSizer12->Add( m_helpLabel2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
mainSizer->Add( bSizer12, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
mainSizer->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
mainSizer->Add( m_staticline, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,12 +20,13 @@ class WX_INFOBAR;
|
|||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/bmpcbox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
@ -37,21 +38,29 @@ class WX_INFOBAR;
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_onBorderChecked( wxCommandEvent& event ){ onBorderChecked( event ); }
|
||||
void _wxFB_onFillChecked( wxCommandEvent& event ){ onFillChecked( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
WX_INFOBAR* m_infoBar;
|
||||
wxStaticText* m_lineWidthLabel;
|
||||
wxTextCtrl* m_lineWidthCtrl;
|
||||
wxStaticText* m_lineWidthUnits;
|
||||
wxStaticText* m_lineColorLabel;
|
||||
wxPanel* m_panel1;
|
||||
COLOR_SWATCH* m_lineColorSwatch;
|
||||
wxStaticText* m_lineStyleLabel;
|
||||
wxBitmapComboBox* m_lineStyleCombo;
|
||||
wxGridBagSizer* m_textEntrySizer;
|
||||
wxCheckBox* m_borderCheckbox;
|
||||
wxStaticText* m_borderWidthLabel;
|
||||
wxTextCtrl* m_borderWidthCtrl;
|
||||
wxStaticText* m_borderWidthUnits;
|
||||
wxStaticText* m_borderColorLabel;
|
||||
wxPanel* m_panelBorderColor;
|
||||
COLOR_SWATCH* m_borderColorSwatch;
|
||||
wxStaticText* m_borderStyleLabel;
|
||||
wxBitmapComboBox* m_borderStyleCombo;
|
||||
wxCheckBox* m_filledCtrl;
|
||||
wxStaticText* m_fillColorLabel;
|
||||
wxPanel* m_panel11;
|
||||
wxPanel* m_panelFillColor;
|
||||
COLOR_SWATCH* m_fillColorSwatch;
|
||||
wxStaticText* m_helpLabel1;
|
||||
wxStaticText* m_helpLabel2;
|
||||
|
@ -60,6 +69,11 @@ class DIALOG_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void onBorderChecked( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onFillChecked( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("%s Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
|
|
@ -458,14 +458,9 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataFromWindow()
|
|||
STROKE_PARAMS stroke = textBox->GetStroke();
|
||||
|
||||
if( m_borderCheckbox->GetValue() )
|
||||
{
|
||||
if( !m_borderWidth.IsIndeterminate() )
|
||||
stroke.SetWidth( m_borderWidth.GetValue() );
|
||||
}
|
||||
stroke.SetWidth( std::max( (long long int) 0, m_borderWidth.GetValue() ) );
|
||||
else
|
||||
{
|
||||
stroke.SetWidth( -1 );
|
||||
}
|
||||
|
||||
auto it = lineTypeNames.begin();
|
||||
std::advance( it, m_borderStyleCombo->GetSelection() );
|
||||
|
|
|
@ -184,7 +184,7 @@ bool DIALOG_WIRE_BUS_PROPERTIES::TransferDataFromWindow()
|
|||
{
|
||||
if( !m_wireWidth.IsIndeterminate() )
|
||||
{
|
||||
int width = m_wireWidth.GetValue();
|
||||
int width = std::max( (long long int) 0, m_wireWidth.GetValue() );
|
||||
|
||||
if( item->Type() == SCH_LINE_T )
|
||||
static_cast<SCH_LINE*>( item )->SetLineWidth( width );
|
||||
|
|
|
@ -23,27 +23,27 @@ DIALOG_WIRE_BUS_PROPERTIES_BASE::DIALOG_WIRE_BUS_PROPERTIES_BASE( wxWindow* pare
|
|||
mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerGeneral;
|
||||
fgSizerGeneral = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerGeneral = new wxFlexGridSizer( 0, 3, 3, 0 );
|
||||
fgSizerGeneral->AddGrowableCol( 1 );
|
||||
fgSizerGeneral->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerGeneral->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticTextWidth = new wxStaticText( this, wxID_ANY, _("Wire/bus width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextWidth->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_staticTextWidth, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
fgSizerGeneral->Add( m_staticTextWidth, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
||||
|
||||
m_lineWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
fgSizerGeneral->Add( m_lineWidth, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
fgSizerGeneral->Add( m_lineWidth, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 3 );
|
||||
|
||||
m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticWidthUnits->Wrap( -1 );
|
||||
m_staticWidthUnits->SetMinSize( wxSize( 40,-1 ) );
|
||||
|
||||
fgSizerGeneral->Add( m_staticWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
fgSizerGeneral->Add( m_staticWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
||||
|
||||
m_staticTextColor = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextColor->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_staticTextColor, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerGeneral->Add( m_staticTextColor, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer2;
|
||||
|
@ -56,19 +56,28 @@ DIALOG_WIRE_BUS_PROPERTIES_BASE::DIALOG_WIRE_BUS_PROPERTIES_BASE( wxWindow* pare
|
|||
m_panel1->SetSizer( bSizer2 );
|
||||
m_panel1->Layout();
|
||||
bSizer2->Fit( m_panel1 );
|
||||
fgSizerGeneral->Add( m_panel1, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 2 );
|
||||
fgSizerGeneral->Add( m_panel1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticTextStyle = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextStyle->Wrap( -1 );
|
||||
fgSizerGeneral->Add( m_staticTextStyle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerGeneral->Add( m_staticTextStyle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_typeCombo = new wxBitmapComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
|
||||
m_typeCombo->SetMinSize( wxSize( 240,-1 ) );
|
||||
|
||||
fgSizerGeneral->Add( m_typeCombo, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
fgSizerGeneral->Add( m_typeCombo, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 3 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
@ -87,13 +96,19 @@ DIALOG_WIRE_BUS_PROPERTIES_BASE::DIALOG_WIRE_BUS_PROPERTIES_BASE( wxWindow* pare
|
|||
|
||||
mainSizer->Add( fgSizerGeneral, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bSizer3;
|
||||
bSizer3 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_helpLabel1 = new wxStaticText( this, wxID_ANY, _("Set width to 0 to use Netclass wire/bus widths."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_helpLabel1->Wrap( 333 );
|
||||
mainSizer->Add( m_helpLabel1, 0, wxRIGHT|wxLEFT, 10 );
|
||||
m_helpLabel1->Wrap( -1 );
|
||||
bSizer3->Add( m_helpLabel1, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_helpLabel2 = new wxStaticText( this, wxID_ANY, _("Set color to transparent to use Schematic Editor colors."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_helpLabel2->Wrap( -1 );
|
||||
mainSizer->Add( m_helpLabel2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
bSizer3->Add( m_helpLabel2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
mainSizer->Add( bSizer3, 0, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
mainSizer->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
|
|
@ -73,10 +73,10 @@
|
|||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="vgap">0</property>
|
||||
<property name="vgap">3</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -137,7 +137,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -201,7 +201,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -262,7 +262,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -323,7 +323,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">2</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -458,7 +458,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -519,7 +519,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapComboBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -592,6 +592,36 @@
|
|||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
|
@ -781,125 +811,136 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Set width to 0 to use Netclass wire/bus widths.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_helpLabel1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">333</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Set color to transparent to use Schematic Editor colors.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_helpLabel2</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Set width to 0 to use Netclass wire/bus widths.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_helpLabel1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Set color to transparent to use Schematic Editor colors.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_helpLabel2</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
|
|
@ -341,6 +341,9 @@ COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDr
|
|||
color = shape->GetStroke().GetColor();
|
||||
else if( aLayer == LAYER_NOTES_BACKGROUND )
|
||||
color = shape->GetFillColor();
|
||||
|
||||
if( color == COLOR4D::UNSPECIFIED )
|
||||
color = m_schSettings.GetLayerColor( LAYER_NOTES );
|
||||
}
|
||||
else if( aItem->Type() == LIB_SHAPE_T )
|
||||
{
|
||||
|
@ -1760,7 +1763,7 @@ void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer )
|
|||
{
|
||||
m_gal->SetIsFill( true );
|
||||
m_gal->SetIsStroke( false );
|
||||
m_gal->SetFillColor( aShape->GetFillColor() );
|
||||
m_gal->SetFillColor( color );
|
||||
|
||||
drawShape( aShape );
|
||||
}
|
||||
|
|
|
@ -108,7 +108,10 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground ) const
|
|||
|
||||
if( m_fill == FILL_T::FILLED_WITH_COLOR && GetFillColor() != COLOR4D::UNSPECIFIED )
|
||||
{
|
||||
aPlotter->SetColor( GetFillColor() );
|
||||
if( GetFillColor() != COLOR4D::UNSPECIFIED )
|
||||
aPlotter->SetColor( GetFillColor() );
|
||||
else
|
||||
aPlotter->SetColor( aPlotter->RenderSettings()->GetLayerColor( LAYER_NOTES ) );
|
||||
|
||||
switch( GetShape() )
|
||||
{
|
||||
|
@ -244,7 +247,10 @@ void SCH_SHAPE::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset
|
|||
|
||||
if( GetFillMode() == FILL_T::FILLED_WITH_COLOR )
|
||||
{
|
||||
color = GetFillColor();
|
||||
if( GetFillColor() == COLOR4D::UNSPECIFIED )
|
||||
color = aSettings->GetLayerColor( LAYER_NOTES );
|
||||
else
|
||||
color = GetFillColor();
|
||||
|
||||
switch( GetShape() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue