PANEL_COMMON_SETTINGS: minor fixes, mainly cosmetic.
This commit is contained in:
parent
82f657ed03
commit
d03e82602e
|
@ -180,3 +180,12 @@ void PANEL_COMMON_SETTINGS::OnPDFViewerClick( wxCommandEvent& event )
|
|||
m_otherPDFViewer->SetValue( true );
|
||||
m_PDFViewerPath->SetValue( dlg.GetPath() );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::onUpdateUIPdfPath( wxUpdateUIEvent& event )
|
||||
{
|
||||
bool enabled = m_otherPDFViewer->GetValue();
|
||||
m_PDFViewerPath->Enable( enabled );
|
||||
m_pdfViewerBtn->Enable( enabled );
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ protected:
|
|||
void OnScaleAuto( wxCommandEvent& aEvent ) override;
|
||||
void OnTextEditorClick( wxCommandEvent& event ) override;
|
||||
void OnPDFViewerClick( wxCommandEvent& event ) override;
|
||||
void onUpdateUIPdfPath( wxUpdateUIEvent& event ) override;
|
||||
|
||||
DIALOG_SHIM* m_dialog;
|
||||
|
||||
|
|
|
@ -84,7 +84,6 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
gridHelperApps->Add( textEditorLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 4 );
|
||||
|
||||
m_textEditorPath = new wxTextCtrl( sizerHelperApps->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textEditorPath->Enable( false );
|
||||
m_textEditorPath->SetMinSize( wxSize( 360,-1 ) );
|
||||
|
||||
gridHelperApps->Add( m_textEditorPath, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
@ -101,7 +100,6 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
gridHelperApps->Add( m_otherPDFViewer, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 4 );
|
||||
|
||||
m_PDFViewerPath = new wxTextCtrl( sizerHelperApps->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_PDFViewerPath->Enable( false );
|
||||
m_PDFViewerPath->SetMinSize( wxSize( 360,-1 ) );
|
||||
|
||||
gridHelperApps->Add( m_PDFViewerPath, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
@ -119,8 +117,8 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
|
||||
bLeftSizer->Add( sizerHelperApps, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer5;
|
||||
sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface") ), wxVERTICAL );
|
||||
wxStaticBoxSizer* sbSizerIconsOpts;
|
||||
sbSizerIconsOpts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer11;
|
||||
fgSizer11 = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
|
@ -128,39 +126,39 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
fgSizer11->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticText1 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 4 );
|
||||
m_staticTexticonscale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTexticonscale->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticTexticonscale, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 4 );
|
||||
|
||||
wxBoxSizer* bSizer4;
|
||||
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_scaleSlider = new STEPPED_SLIDER( sbSizer5->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_scaleSlider = new STEPPED_SLIDER( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_scaleSlider->SetMinSize( wxSize( 240,-1 ) );
|
||||
|
||||
bSizer4->Add( m_scaleSlider, 1, wxBOTTOM|wxEXPAND, 4 );
|
||||
|
||||
m_staticText2 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText2->Wrap( -1 );
|
||||
bSizer4->Add( m_staticText2, 0, wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 2 );
|
||||
m_staticTextPerCent = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPerCent->Wrap( -1 );
|
||||
bSizer4->Add( m_staticTextPerCent, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
|
||||
|
||||
|
||||
fgSizer11->Add( bSizer4, 1, wxEXPAND, 5 );
|
||||
|
||||
m_scaleAuto = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_scaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer11->Add( m_scaleAuto, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 25 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
sbSizer5->Add( fgSizer11, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
||||
sbSizerIconsOpts->Add( fgSizer11, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxIconsInMenus = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Show icons in menus"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer5->Add( m_checkBoxIconsInMenus, 0, wxALL, 4 );
|
||||
m_checkBoxIconsInMenus = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Show icons in menus"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerIconsOpts->Add( m_checkBoxIconsInMenus, 0, wxALL, 4 );
|
||||
|
||||
|
||||
bLeftSizer->Add( sbSizer5, 0, wxEXPAND|wxALL, 5 );
|
||||
bLeftSizer->Add( sbSizerIconsOpts, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer51;
|
||||
sbSizer51 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
|
||||
|
@ -168,7 +166,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
m_ZoomCenterOpt = new wxCheckBox( sbSizer51->GetStaticBox(), wxID_ANY, _("Ce&nter and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ZoomCenterOpt->SetToolTip( _("Center the cursor on screen when zooming.") );
|
||||
|
||||
sbSizer51->Add( m_ZoomCenterOpt, 0, wxRIGHT|wxLEFT, 4 );
|
||||
sbSizer51->Add( m_ZoomCenterOpt, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
|
||||
|
||||
m_MousewheelPANOpt = new wxCheckBox( sbSizer51->GetStaticBox(), wxID_ANY, _("Use touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MousewheelPANOpt->SetToolTip( _("Enable touchpad-friendly controls (pan with scroll action, zoom with Ctrl+scroll).") );
|
||||
|
@ -181,7 +179,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
sbSizer51->Add( m_AutoPANOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
|
||||
|
||||
|
||||
bLeftSizer->Add( sbSizer51, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bLeftSizer->Add( sbSizer51, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bPanelSizer->Add( bLeftSizer, 0, 0, 5 );
|
||||
|
@ -193,7 +191,9 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
|
||||
// Connect Events
|
||||
m_textEditorBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnTextEditorClick ), NULL, this );
|
||||
m_PDFViewerPath->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_pdfViewerBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
|
||||
m_pdfViewerBtn->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
|
@ -210,7 +210,9 @@ PANEL_COMMON_SETTINGS_BASE::~PANEL_COMMON_SETTINGS_BASE()
|
|||
{
|
||||
// Disconnect Events
|
||||
m_textEditorBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnTextEditorClick ), NULL, this );
|
||||
m_PDFViewerPath->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_pdfViewerBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
|
||||
m_pdfViewerBtn->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
|
|
|
@ -955,7 +955,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
|
@ -1358,7 +1358,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
|
@ -1428,7 +1428,7 @@
|
|||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnUpdateUI">onUpdateUIPdfPath</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
|
@ -1534,7 +1534,7 @@
|
|||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnUpdateUI">onUpdateUIPdfPath</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -1549,7 +1549,7 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">User Interface</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizer5</property>
|
||||
<property name="name">sbSizerIconsOpts</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
|
@ -1572,7 +1572,7 @@
|
|||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1611,7 +1611,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText1</property>
|
||||
<property name="name">m_staticTexticonscale</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1788,7 +1788,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">2</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1827,7 +1827,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText2</property>
|
||||
<property name="name">m_staticTextPerCent</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -2085,7 +2085,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
|
@ -2098,7 +2098,7 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
|
|
@ -60,9 +60,9 @@ class PANEL_COMMON_SETTINGS_BASE : public wxPanel
|
|||
wxRadioButton* m_otherPDFViewer;
|
||||
wxTextCtrl* m_PDFViewerPath;
|
||||
wxBitmapButton* m_pdfViewerBtn;
|
||||
wxStaticText* m_staticText1;
|
||||
wxStaticText* m_staticTexticonscale;
|
||||
STEPPED_SLIDER* m_scaleSlider;
|
||||
wxStaticText* m_staticText2;
|
||||
wxStaticText* m_staticTextPerCent;
|
||||
wxCheckBox* m_scaleAuto;
|
||||
wxCheckBox* m_checkBoxIconsInMenus;
|
||||
wxCheckBox* m_ZoomCenterOpt;
|
||||
|
@ -71,6 +71,7 @@ class PANEL_COMMON_SETTINGS_BASE : public wxPanel
|
|||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnTextEditorClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onUpdateUIPdfPath( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnPDFViewerClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnScaleSlider( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnScaleAuto( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
|
|
@ -41,7 +41,7 @@ PANEL_PCBNEW_SETTINGS_BASE::PANEL_PCBNEW_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
|
||||
m_Show_Page_Limits = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Show_Page_Limits->SetValue(true);
|
||||
bOptionsSizer->Add( m_Show_Page_Limits, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
bOptionsSizer->Add( m_Show_Page_Limits, 0, wxALL, 5 );
|
||||
|
||||
m_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
|
||||
|
@ -108,7 +108,7 @@ PANEL_PCBNEW_SETTINGS_BASE::PANEL_PCBNEW_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
m_DrcOn->SetValue(true);
|
||||
m_DrcOn->SetToolTip( _("Enable DRC control. When DRC control is disabled, all connections are allowed.") );
|
||||
|
||||
bLegacyOptionsSizer->Add( m_DrcOn, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bLegacyOptionsSizer->Add( m_DrcOn, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_TrackAutodel = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACK_AUTODEL, _("Auto-delete old tracks"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TrackAutodel->SetValue(true);
|
||||
|
|
|
@ -318,7 +318,7 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1125,7 +1125,7 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
|
Loading…
Reference in New Issue