From cce366bc1d9d0a6e5da6138f78a3ce20905e141e Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 22 Sep 2023 15:14:42 +0100 Subject: [PATCH] Tidy up 3D renderer display options. --- .../dialogs/panel_3D_display_options_base.cpp | 28 +++++-------- .../dialogs/panel_3D_display_options_base.fbp | 41 +++++++------------ 2 files changed, 25 insertions(+), 44 deletions(-) diff --git a/3d-viewer/dialogs/panel_3D_display_options_base.cpp b/3d-viewer/dialogs/panel_3D_display_options_base.cpp index 36209b1e71..3afc034abb 100644 --- a/3d-viewer/dialogs/panel_3D_display_options_base.cpp +++ b/3d-viewer/dialogs/panel_3D_display_options_base.cpp @@ -28,7 +28,7 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent, bSizeLeft->Add( m_staticline4, 0, wxEXPAND|wxBOTTOM, 5 ); wxFlexGridSizer* fgSizer2; - fgSizer2 = new wxFlexGridSizer( 0, 1, 4, 0 ); + fgSizer2 = new wxFlexGridSizer( 0, 1, 5, 0 ); fgSizer2->SetFlexibleDirection( wxBOTH ); fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -41,7 +41,7 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent, m_checkBoxAreas = new wxCheckBox( this, wxID_ANY, _("Show filled areas in zones"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer2->Add( m_checkBoxAreas, 0, wxRIGHT|wxLEFT, 5 ); - m_checkBoxRenderPlatedPadsAsPlated = new wxCheckBox( this, wxID_ANY, _("Use bare copper color for unplated copper"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxRenderPlatedPadsAsPlated = new wxCheckBox( this, wxID_ANY, _("Use bare copper color for unplated copper (slow)"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkBoxRenderPlatedPadsAsPlated->SetToolTip( _("Use different colors for plated and unplated copper. (Slow)") ); fgSizer2->Add( m_checkBoxRenderPlatedPadsAsPlated, 0, wxRIGHT|wxLEFT, 5 ); @@ -94,29 +94,21 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent, bSizerRotAngle->Add( m_staticTextRotAngleUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizerRight->Add( bSizerRotAngle, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - wxBoxSizer* bSizer9; - bSizer9 = new wxBoxSizer( wxVERTICAL ); - - m_checkBoxEnableAnimation = new wxCheckBox( this, wxID_ANY, _("Enable animation"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxEnableAnimation->SetValue(true); - bSizer9->Add( m_checkBoxEnableAnimation, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - - bSizerRight->Add( bSizer9, 0, wxEXPAND|wxLEFT, 5 ); + bSizerRight->Add( bSizerRotAngle, 0, wxTOP|wxLEFT, 5 ); wxBoxSizer* bSizerSlider; bSizerSlider = new wxBoxSizer( wxHORIZONTAL ); - m_staticAnimationSpeed = new wxStaticText( this, wxID_ANY, _("Animation speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxEnableAnimation = new wxCheckBox( this, wxID_ANY, _("Redraw while moving"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxEnableAnimation->SetValue(true); + bSizerSlider->Add( m_checkBoxEnableAnimation, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_staticAnimationSpeed = new wxStaticText( this, wxID_ANY, _("Redraw speed:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticAnimationSpeed->Wrap( -1 ); - bSizerSlider->Add( m_staticAnimationSpeed, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + bSizerSlider->Add( m_staticAnimationSpeed, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); m_sliderAnimationSpeed = new wxSlider( this, wxID_ANY, 3, 1, 5, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); - m_sliderAnimationSpeed->SetMinSize( wxSize( 100,-1 ) ); - - bSizerSlider->Add( m_sliderAnimationSpeed, 1, wxEXPAND|wxLEFT|wxRIGHT, 15 ); + bSizerSlider->Add( m_sliderAnimationSpeed, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); bSizerRight->Add( bSizerSlider, 0, wxEXPAND|wxLEFT, 5 ); diff --git a/3d-viewer/dialogs/panel_3D_display_options_base.fbp b/3d-viewer/dialogs/panel_3D_display_options_base.fbp index e5a5cbcc53..c82c63eb81 100644 --- a/3d-viewer/dialogs/panel_3D_display_options_base.fbp +++ b/3d-viewer/dialogs/panel_3D_display_options_base.fbp @@ -209,7 +209,7 @@ wxFLEX_GROWMODE_SPECIFIED none 0 - 4 + 5 5 wxLEFT @@ -435,7 +435,7 @@ 0 0 wxID_ANY - Use bare copper color for unplated copper + Use bare copper color for unplated copper (slow) 0 @@ -734,11 +734,11 @@ - + 5 - wxTOP|wxBOTTOM|wxLEFT + wxTOP|wxLEFT 0 - + bSizerRotAngle wxHORIZONTAL @@ -937,12 +937,12 @@ 0 - bSizer9 - wxVERTICAL + bSizerSlider + wxHORIZONTAL none 5 - wxTOP|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1 @@ -973,7 +973,7 @@ 0 0 wxID_ANY - Enable animation + Redraw while moving 0 @@ -1005,19 +1005,8 @@ OnCheckEnableAnimation - - - - 5 - wxEXPAND|wxLEFT - 0 - - - bSizerSlider - wxHORIZONTAL - none - 5 + 15 wxALIGN_CENTER_VERTICAL|wxLEFT 0 @@ -1048,7 +1037,7 @@ 0 0 wxID_ANY - Animation speed: + Redraw speed: 0 0 @@ -1078,9 +1067,9 @@ - 15 - wxEXPAND|wxLEFT|wxRIGHT - 1 + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 1 1 @@ -1116,7 +1105,7 @@ 1 0 - 100,-1 + -1,-1 1 m_sliderAnimationSpeed 1