From c5df98a170ad02f1cb3afe2a73cbea225d929762 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 11 Dec 2019 20:49:58 +0000 Subject: [PATCH] Clean up spacing in Eeschema Display Options. Also adds a note for editing highlight color. --- .../panel_eeschema_display_options.cpp | 4 + .../panel_eeschema_display_options_base.cpp | 25 ++--- .../panel_eeschema_display_options_base.fbp | 91 +++++++++++++++---- .../panel_eeschema_display_options_base.h | 1 + 4 files changed, 89 insertions(+), 32 deletions(-) diff --git a/eeschema/dialogs/panel_eeschema_display_options.cpp b/eeschema/dialogs/panel_eeschema_display_options.cpp index 88d23ddbe3..d38b61c7af 100644 --- a/eeschema/dialogs/panel_eeschema_display_options.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options.cpp @@ -44,6 +44,10 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS::PANEL_EESCHEMA_DISPLAY_OPTIONS( SCH_EDIT_FRAME* m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions ); m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 ); + + wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); + infoFont.SetSymbolicSize( wxFONTSIZE_SMALL ); + m_highlightColorNote->SetFont( infoFont ); } diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.cpp b/eeschema/dialogs/panel_eeschema_display_options_base.cpp index 1b11cbe118..f2a3ae978a 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options_base.cpp @@ -87,35 +87,32 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind bSizer6->Add( m_choiceSeparatorRefId, 1, wxEXPAND|wxRIGHT, 5 ); - sbSizer1->Add( bSizer6, 0, wxEXPAND|wxRIGHT, 5 ); - - - sbSizer1->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); + sbSizer1->Add( bSizer6, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 ); m_checkShowHiddenPins = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("S&how hidden pins"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer1->Add( m_checkShowHiddenPins, 0, wxEXPAND|wxALL, 5 ); m_checkSuperSub = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Enable superscript/subscript markup"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer1->Add( m_checkSuperSub, 0, wxALL|wxEXPAND, 5 ); + sbSizer1->Add( m_checkSuperSub, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_checkPageLimits = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Show page limi&ts"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkPageLimits->SetValue(true); - sbSizer1->Add( m_checkPageLimits, 0, wxEXPAND|wxALL, 5 ); + sbSizer1->Add( m_checkPageLimits, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bRightColumn->Add( sbSizer1, 1, wxEXPAND|wxTOP, 5 ); + bRightColumn->Add( sbSizer1, 0, wxEXPAND|wxTOP, 5 ); wxStaticBoxSizer* sbSizer3; sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Selection") ), wxVERTICAL ); m_checkSelTextBox = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Draw selected text items as box"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer3->Add( m_checkSelTextBox, 0, wxALL|wxEXPAND, 5 ); + sbSizer3->Add( m_checkSelTextBox, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_checkSelDrawChildItems = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Draw selected child items"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer3->Add( m_checkSelDrawChildItems, 0, wxALL|wxEXPAND, 5 ); + sbSizer3->Add( m_checkSelDrawChildItems, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_checkSelFillShapes = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Fill selected shapes"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer3->Add( m_checkSelFillShapes, 0, wxALL|wxEXPAND, 5 ); + sbSizer3->Add( m_checkSelFillShapes, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxFlexGridSizer* fgSizer321; fgSizer321 = new wxFlexGridSizer( 0, 2, 3, 0 ); @@ -125,14 +122,18 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind m_selWidthLabel = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("&Highlight thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); m_selWidthLabel->Wrap( -1 ); - fgSizer321->Add( m_selWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + fgSizer321->Add( m_selWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_selWidthCtrl = new wxSpinCtrlDouble( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 50, 0, 1 ); m_selWidthCtrl->SetDigits( 0 ); fgSizer321->Add( m_selWidthCtrl, 0, wxEXPAND, 5 ); - sbSizer3->Add( fgSizer321, 1, wxEXPAND|wxTOP, 5 ); + sbSizer3->Add( fgSizer321, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_highlightColorNote = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Note: highlight color can be edited in the \"Colors\" section."), wxDefaultPosition, wxDefaultSize, 0 ); + m_highlightColorNote->Wrap( -1 ); + sbSizer3->Add( m_highlightColorNote, 0, wxALL, 5 ); bRightColumn->Add( sbSizer3, 1, wxEXPAND|wxTOP, 5 ); diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.fbp b/eeschema/dialogs/panel_eeschema_display_options_base.fbp index c0df338da6..39b9b7f3e2 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.fbp +++ b/eeschema/dialogs/panel_eeschema_display_options_base.fbp @@ -667,7 +667,7 @@ 5 wxEXPAND|wxTOP - 1 + 0 wxID_ANY Appearance @@ -678,7 +678,7 @@ none 5 - wxEXPAND|wxRIGHT + wxEXPAND|wxBOTTOM|wxRIGHT 0 @@ -812,16 +812,6 @@ - - 10 - wxEXPAND|wxTOP|wxBOTTOM - 0 - - 0 - protected - 0 - - 5 wxEXPAND|wxALL @@ -888,7 +878,7 @@ 5 - wxALL|wxEXPAND + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -952,7 +942,7 @@ 5 - wxEXPAND|wxALL + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1030,7 +1020,7 @@ none 5 - wxALL|wxEXPAND + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1094,7 +1084,7 @@ 5 - wxALL|wxEXPAND + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1158,7 +1148,7 @@ 5 - wxALL|wxEXPAND + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1222,8 +1212,8 @@ 5 - wxEXPAND|wxTOP - 1 + wxEXPAND|wxTOP|wxBOTTOM + 0 2 wxBOTH @@ -1238,7 +1228,7 @@ 3 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1 @@ -1363,6 +1353,67 @@ + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Note: highlight color can be edited in the "Colors" section. + 0 + + 0 + + + 0 + + 1 + m_highlightColorNote + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.h b/eeschema/dialogs/panel_eeschema_display_options_base.h index 41d5874a14..c956db5071 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.h +++ b/eeschema/dialogs/panel_eeschema_display_options_base.h @@ -54,6 +54,7 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public wxPanel wxCheckBox* m_checkSelFillShapes; wxStaticText* m_selWidthLabel; wxSpinCtrlDouble* m_selWidthCtrl; + wxStaticText* m_highlightColorNote; public: