Improve editor preferences

This commit is contained in:
Loic Guegan 2022-02-23 20:27:13 +01:00
parent 5a43d62920
commit b3ba310792
3 changed files with 756 additions and 4 deletions

View file

@ -11,6 +11,50 @@
EditorPrefsPanelBF::EditorPrefsPanelBF( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
wxGridSizer* main_sizer;
main_sizer = new wxGridSizer( 10, 2, 0, 0 );
color_margin_label = new wxStaticText( this, wxID_ANY, wxT("Margin color"), wxDefaultPosition, wxDefaultSize, 0 );
color_margin_label->Wrap( -1 );
main_sizer->Add( color_margin_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
color_margin = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
main_sizer->Add( color_margin, 0, wxALL, 5 );
color_scrollbar_label = new wxStaticText( this, wxID_ANY, wxT("Scrollbar color"), wxDefaultPosition, wxDefaultSize, 0 );
color_scrollbar_label->Wrap( -1 );
main_sizer->Add( color_scrollbar_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
color_scrollbar = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
main_sizer->Add( color_scrollbar, 0, wxALL, 5 );
color_scrollbarbg_label = new wxStaticText( this, wxID_ANY, wxT("Scrollbar background color"), wxDefaultPosition, wxDefaultSize, 0 );
color_scrollbarbg_label->Wrap( -1 );
main_sizer->Add( color_scrollbarbg_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
color_scrollbarbg = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
main_sizer->Add( color_scrollbarbg, 0, wxALL, 5 );
color_commentbg_label = new wxStaticText( this, wxID_ANY, wxT("Comments background color"), wxDefaultPosition, wxDefaultSize, 0 );
color_commentbg_label->Wrap( -1 );
main_sizer->Add( color_commentbg_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
color_commentbg = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
main_sizer->Add( color_commentbg, 0, wxALL, 5 );
row_size_label = new wxStaticText( this, wxID_ANY, wxT("Move row size"), wxDefaultPosition, wxDefaultSize, 0 );
row_size_label->Wrap( -1 );
main_sizer->Add( row_size_label, 0, wxALL, 5 );
row_size = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 );
main_sizer->Add( row_size, 0, wxALL, 5 );
show_move_icons = new wxCheckBox( this, wxID_ANY, wxT("Show move icons"), wxDefaultPosition, wxDefaultSize, 0 );
main_sizer->Add( show_move_icons, 0, wxALL, 5 );
this->SetSizer( main_sizer );
this->Layout();
}
EditorPrefsPanelBF::~EditorPrefsPanelBF()

View file

@ -9,12 +9,17 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/panel.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/clrpicker.h>
#include <wx/spinctrl.h>
#include <wx/checkbox.h>
#include <wx/sizer.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
@ -27,10 +32,21 @@ class EditorPrefsPanelBF : public wxPanel
private:
protected:
wxStaticText* color_margin_label;
wxColourPickerCtrl* color_margin;
wxStaticText* color_scrollbar_label;
wxColourPickerCtrl* color_scrollbar;
wxStaticText* color_scrollbarbg_label;
wxColourPickerCtrl* color_scrollbarbg;
wxStaticText* color_commentbg_label;
wxColourPickerCtrl* color_commentbg;
wxStaticText* row_size_label;
wxSpinCtrl* row_size;
wxCheckBox* show_move_icons;
public:
EditorPrefsPanelBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
EditorPrefsPanelBF( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 622,420 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~EditorPrefsPanelBF();