From df69ce5e674ff8bfd7723730384ab39981f0bd30 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 9 Jan 2021 12:57:18 +0000 Subject: [PATCH] Layout and textual simplification and cleanup. --- common/dialogs/panel_common_settings_base.cpp | 42 +++--- common/dialogs/panel_common_settings_base.fbp | 125 +++++++++--------- common/dialogs/panel_mouse_settings_base.cpp | 18 +-- common/dialogs/panel_mouse_settings_base.fbp | 22 +-- 4 files changed, 111 insertions(+), 96 deletions(-) diff --git a/common/dialogs/panel_common_settings_base.cpp b/common/dialogs/panel_common_settings_base.cpp index 5d04ad64b0..680c66bc40 100644 --- a/common/dialogs/panel_common_settings_base.cpp +++ b/common/dialogs/panel_common_settings_base.cpp @@ -96,45 +96,55 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind bLeftSizer->Add( gbSizer1, 0, wxEXPAND|wxALL, 15 ); wxStaticBoxSizer* sizerHelperApps; - sizerHelperApps = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Helper Applications") ), wxHORIZONTAL ); + sizerHelperApps = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Helper Applications") ), wxVERTICAL ); - wxGridBagSizer* gridHelperApps; - gridHelperApps = new wxGridBagSizer( 5, 3 ); - gridHelperApps->SetFlexibleDirection( wxBOTH ); - gridHelperApps->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - gridHelperApps->SetEmptyCellSize( wxSize( -1,1 ) ); + wxBoxSizer* bSizer61; + bSizer61 = new wxBoxSizer( wxHORIZONTAL ); wxStaticText* textEditorLabel; textEditorLabel = new wxStaticText( sizerHelperApps->GetStaticBox(), wxID_ANY, _("Text editor:"), wxDefaultPosition, wxDefaultSize, 0 ); textEditorLabel->Wrap( -1 ); - gridHelperApps->Add( textEditorLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 4 ); + bSizer61->Add( textEditorLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_textEditorPath = new wxTextCtrl( sizerHelperApps->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textEditorPath->SetMinSize( wxSize( 280,-1 ) ); - gridHelperApps->Add( m_textEditorPath, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 8 ); + bSizer61->Add( m_textEditorPath, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_textEditorBtn = new wxBitmapButton( sizerHelperApps->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - gridHelperApps->Add( m_textEditorBtn, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + bSizer61->Add( m_textEditorBtn, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + sizerHelperApps->Add( bSizer61, 0, wxEXPAND|wxRIGHT, 5 ); + + + sizerHelperApps->Add( 0, 12, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxVERTICAL ); m_defaultPDFViewer = new wxRadioButton( sizerHelperApps->GetStaticBox(), wxID_ANY, _("System default PDF viewer"), wxDefaultPosition, wxDefaultSize, 0 ); - gridHelperApps->Add( m_defaultPDFViewer, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), 0, 4 ); + bSizer8->Add( m_defaultPDFViewer, 1, wxTOP|wxRIGHT|wxLEFT, 5 ); + + + sizerHelperApps->Add( bSizer8, 0, wxEXPAND|wxBOTTOM, 3 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxHORIZONTAL ); m_otherPDFViewer = new wxRadioButton( sizerHelperApps->GetStaticBox(), wxID_ANY, _("Other:"), wxDefaultPosition, wxDefaultSize, 0 ); - gridHelperApps->Add( m_otherPDFViewer, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 4 ); + bSizer7->Add( m_otherPDFViewer, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_PDFViewerPath = new wxTextCtrl( sizerHelperApps->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_PDFViewerPath->SetMinSize( wxSize( 280,-1 ) ); - gridHelperApps->Add( m_PDFViewerPath, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 8 ); + bSizer7->Add( m_PDFViewerPath, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_pdfViewerBtn = new wxBitmapButton( sizerHelperApps->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - gridHelperApps->Add( m_pdfViewerBtn, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + bSizer7->Add( m_pdfViewerBtn, 0, wxALIGN_CENTER_VERTICAL, 5 ); - gridHelperApps->AddGrowableCol( 1 ); - - sizerHelperApps->Add( gridHelperApps, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); + sizerHelperApps->Add( bSizer7, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 ); bLeftSizer->Add( sizerHelperApps, 0, wxEXPAND|wxALL, 5 ); diff --git a/common/dialogs/panel_common_settings_base.fbp b/common/dialogs/panel_common_settings_base.fbp index 0a8868a49e..a9a41acad7 100644 --- a/common/dialogs/panel_common_settings_base.fbp +++ b/common/dialogs/panel_common_settings_base.fbp @@ -877,36 +877,27 @@ 5 wxEXPAND|wxALL 0 - + wxID_ANY Helper Applications sizerHelperApps - wxHORIZONTAL + wxVERTICAL 1 none - + 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + wxEXPAND|wxRIGHT 0 - - -1,1 - wxBOTH - 1 - - 3 + - gridHelperApps - wxFLEX_GROWMODE_SPECIFIED + bSizer61 + wxHORIZONTAL none - 5 - - 4 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 0 - 1 + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 1 1 @@ -964,13 +955,10 @@ -1 - - 8 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - 1 + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 1 1 1 @@ -1031,13 +1019,10 @@ - + 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - 1 + wxALIGN_CENTER_VERTICAL + 0 1 1 @@ -1107,13 +1092,31 @@ OnTextEditorClick - - 4 - 3 - 0 - - 3 - 1 + + + + 5 + wxEXPAND + 0 + + 12 + protected + 0 + + + + 3 + wxEXPAND|wxBOTTOM + 0 + + + bSizer8 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 1 1 1 @@ -1174,13 +1177,21 @@ - - 4 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 4 - 1 + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT + 0 + + + bSizer7 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 1 1 @@ -1241,13 +1252,10 @@ - - 8 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 4 - 1 + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 1 1 1 @@ -1309,13 +1317,10 @@ onUpdateUIPdfPath - + 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 4 - 1 + wxALIGN_CENTER_VERTICAL + 0 1 1 diff --git a/common/dialogs/panel_mouse_settings_base.cpp b/common/dialogs/panel_mouse_settings_base.cpp index 51f4ee85b2..079a43df7f 100644 --- a/common/dialogs/panel_mouse_settings_base.cpp +++ b/common/dialogs/panel_mouse_settings_base.cpp @@ -115,15 +115,15 @@ PANEL_MOUSE_SETTINGS_BASE::PANEL_MOUSE_SETTINGS_BASE( wxWindow* parent, wxWindow fgSizer1->Add( m_choiceRightButtonDrag, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - sbSizer2->Add( fgSizer1, 1, wxALL|wxEXPAND, 5 ); + sbSizer2->Add( fgSizer1, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer1->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 ); + bSizer1->Add( sbSizer2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); wxStaticBoxSizer* sbSizer3; sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Mouse Wheel and Touchpad Scrolling") ), wxVERTICAL ); - m_staticText21 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Behavior of vertical touchpad or scroll wheel:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Behavior of vertical touchpad or scroll wheel movement:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText21->Wrap( -1 ); sbSizer3->Add( m_staticText21, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -132,11 +132,11 @@ PANEL_MOUSE_SETTINGS_BASE::PANEL_MOUSE_SETTINGS_BASE( wxWindow* parent, wxWindow fgSizer2->SetFlexibleDirection( wxHORIZONTAL ); fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText19 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("While pressing:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText19 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_staticText19->Wrap( -1 ); fgSizer2->Add( m_staticText19, 0, wxALIGN_RIGHT|wxALL, 5 ); - m_staticText17 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("None"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("No Modifiers"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText17->Wrap( -1 ); fgSizer2->Add( m_staticText17, 0, wxALL, 5 ); @@ -168,7 +168,7 @@ PANEL_MOUSE_SETTINGS_BASE::PANEL_MOUSE_SETTINGS_BASE( wxWindow* parent, wxWindow m_rbZoomAlt = new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer2->Add( m_rbZoomAlt, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - m_staticText11 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Pan up / down:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Pan up/down:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText11->Wrap( -1 ); fgSizer2->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); @@ -184,7 +184,7 @@ PANEL_MOUSE_SETTINGS_BASE::PANEL_MOUSE_SETTINGS_BASE( wxWindow* parent, wxWindow m_rbPanVAlt = new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer2->Add( m_rbPanVAlt, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - m_staticText20 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Pan left / right:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText20 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Pan left/right:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText20->Wrap( -1 ); fgSizer2->Add( m_staticText20, 0, wxALIGN_RIGHT|wxALL, 5 ); @@ -203,13 +203,13 @@ PANEL_MOUSE_SETTINGS_BASE::PANEL_MOUSE_SETTINGS_BASE( wxWindow* parent, wxWindow sbSizer3->Add( fgSizer2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 24 ); - m_checkEnablePanH = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Pan left/right with horizontal touchpad or scroll wheel movement"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkEnablePanH = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Pan left/right with horizontal movement"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkEnablePanH->SetToolTip( _("Pan the canvas left and right when scrolling left to right on the touchpad") ); sbSizer3->Add( m_checkEnablePanH, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer1->Add( sbSizer3, 1, wxALL|wxEXPAND, 5 ); + bSizer1->Add( sbSizer3, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); this->SetSizer( bSizer1 ); diff --git a/common/dialogs/panel_mouse_settings_base.fbp b/common/dialogs/panel_mouse_settings_base.fbp index c570fdbcb9..c0a8c87e9a 100644 --- a/common/dialogs/panel_mouse_settings_base.fbp +++ b/common/dialogs/panel_mouse_settings_base.fbp @@ -644,8 +644,8 @@ - 5 - wxALL|wxEXPAND + 10 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 wxID_ANY @@ -657,7 +657,7 @@ none 5 - wxALL|wxEXPAND + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 1 2 @@ -926,8 +926,8 @@ - 5 - wxALL|wxEXPAND + 10 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 1 wxID_ANY @@ -969,7 +969,7 @@ 0 0 wxID_ANY - Behavior of vertical touchpad or scroll wheel: + Behavior of vertical touchpad or scroll wheel movement: 0 0 @@ -1046,7 +1046,7 @@ 0 0 wxID_ANY - While pressing: + 0 0 @@ -1107,7 +1107,7 @@ 0 0 wxID_ANY - None + No Modifiers 0 0 @@ -1672,7 +1672,7 @@ 0 0 wxID_ANY - Pan up / down: + Pan up/down: 0 0 @@ -1993,7 +1993,7 @@ 0 0 wxID_ANY - Pan left / right: + Pan left/right: 0 0 @@ -2317,7 +2317,7 @@ 0 0 wxID_ANY - Pan left/right with horizontal touchpad or scroll wheel movement + Pan left/right with horizontal movement 0