From c5dd62069640d8ab5ea5af5a356a3b665ffe0d5d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 27 Oct 2021 22:51:35 +0100 Subject: [PATCH] Improve spacing and alignment in html report panel. --- common/dialogs/wx_html_report_panel_base.cpp | 16 ++++--- common/dialogs/wx_html_report_panel_base.fbp | 44 +++++++++++++------- common/dialogs/wx_html_report_panel_base.h | 7 ++-- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/common/dialogs/wx_html_report_panel_base.cpp b/common/dialogs/wx_html_report_panel_base.cpp index e65af93514..41c2a9ab70 100644 --- a/common/dialogs/wx_html_report_panel_base.cpp +++ b/common/dialogs/wx_html_report_panel_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -22,14 +22,14 @@ WX_HTML_REPORT_PANEL_BASE::WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindow m_fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_htmlView = new HTML_WINDOW( m_box->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); - m_fgSizer->Add( m_htmlView, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 2 ); + m_fgSizer->Add( m_htmlView, 1, wxEXPAND|wxRIGHT|wxLEFT, 2 ); wxBoxSizer* bSizerBottom; bSizerBottom = new wxBoxSizer( wxHORIZONTAL ); m_staticTextShow = new wxStaticText( m_box->GetStaticBox(), wxID_ANY, _("Show:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextShow->Wrap( -1 ); - bSizerBottom->Add( m_staticTextShow, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 ); + bSizerBottom->Add( m_staticTextShow, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 ); m_checkBoxShowAll = new wxCheckBox( m_box->GetStaticBox(), wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkBoxShowAll->SetValue(true); @@ -44,23 +44,29 @@ WX_HTML_REPORT_PANEL_BASE::WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindow m_errorsBadge = new NUMBER_BADGE( m_box->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); bSizerBottom->Add( m_errorsBadge, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 4 ); + + bSizerBottom->Add( 10, 0, 0, wxEXPAND, 5 ); + m_checkBoxShowWarnings = new wxCheckBox( m_box->GetStaticBox(), wxID_ANY, _("Warnings"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerBottom->Add( m_checkBoxShowWarnings, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); m_warningsBadge = new NUMBER_BADGE( m_box->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); bSizerBottom->Add( m_warningsBadge, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 4 ); + + bSizerBottom->Add( 10, 0, 0, wxEXPAND, 5 ); + m_checkBoxShowActions = new wxCheckBox( m_box->GetStaticBox(), wxID_ANY, _("Actions"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerBottom->Add( m_checkBoxShowActions, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - bSizerBottom->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); + bSizerBottom->Add( 20, 0, 0, wxEXPAND, 5 ); m_checkBoxShowInfos = new wxCheckBox( m_box->GetStaticBox(), wxID_ANY, _("Infos"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerBottom->Add( m_checkBoxShowInfos, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - bSizerBottom->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 ); + bSizerBottom->Add( 20, 0, 1, wxEXPAND, 5 ); m_btnSaveReportToFile = new wxButton( m_box->GetStaticBox(), wxID_ANY, _("Save..."), wxDefaultPosition, wxDefaultSize, 0 ); bSizerBottom->Add( m_btnSaveReportToFile, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); diff --git a/common/dialogs/wx_html_report_panel_base.fbp b/common/dialogs/wx_html_report_panel_base.fbp index 76cf8dfa29..6a79bb0eab 100644 --- a/common/dialogs/wx_html_report_panel_base.fbp +++ b/common/dialogs/wx_html_report_panel_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,7 +14,6 @@ wx_html_report_panel_base 1000 none - 1 WX_HTML_REPORT_PANEL_BASE @@ -26,7 +25,6 @@ 1 1 UI - 0 0 0 @@ -48,7 +46,6 @@ -1,-1 - 0 wxTAB_TRAVERSAL @@ -78,7 +75,7 @@ 0 2 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + wxEXPAND|wxRIGHT|wxLEFT 1 1 @@ -145,8 +142,8 @@ wxHORIZONTAL none - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT + 2 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -407,6 +404,16 @@ + + 5 + wxEXPAND + 0 + + 0 + protected + 10 + + 5 wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT @@ -534,6 +541,16 @@ + + 5 + wxEXPAND + 0 + + 0 + protected + 10 + + 5 wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT @@ -600,13 +617,13 @@ - 10 - wxEXPAND|wxRIGHT|wxLEFT + 5 + wxEXPAND 0 0 protected - 0 + 20 @@ -675,13 +692,13 @@ - 10 - wxEXPAND|wxRIGHT|wxLEFT + 5 + wxEXPAND 1 0 protected - 0 + 20 @@ -697,7 +714,6 @@ - 0 diff --git a/common/dialogs/wx_html_report_panel_base.h b/common/dialogs/wx_html_report_panel_base.h index 237f7041b8..da8004fa55 100644 --- a/common/dialogs/wx_html_report_panel_base.h +++ b/common/dialogs/wx_html_report_panel_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -20,10 +20,10 @@ #include #include #include -#include #include #include #include +#include #include #include #include @@ -52,7 +52,7 @@ class WX_HTML_REPORT_PANEL_BASE : public wxPanel wxCheckBox* m_checkBoxShowInfos; wxButton* m_btnSaveReportToFile; - // Virtual event handlers, override them in your derived class + // Virtual event handlers, overide them in your derived class virtual void onRightClick( wxMouseEvent& event ) { event.Skip(); } virtual void onCheckBoxShowAll( wxCommandEvent& event ) { event.Skip(); } virtual void onCheckBoxShowErrors( wxCommandEvent& event ) { event.Skip(); } @@ -65,7 +65,6 @@ class WX_HTML_REPORT_PANEL_BASE : public wxPanel public: WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); - ~WX_HTML_REPORT_PANEL_BASE(); };