diff --git a/common/dialogs/panel_common_settings.cpp b/common/dialogs/panel_common_settings.cpp
index b44ba1648d..5be1732140 100644
--- a/common/dialogs/panel_common_settings.cpp
+++ b/common/dialogs/panel_common_settings.cpp
@@ -77,6 +77,8 @@ PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aP
m_textEditorBtn->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
m_pdfViewerBtn->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
+ m_fontScalingHelp->SetFont( KIUI::GetInfoFont( this ).Italic() );
+
m_canvasScaleCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED,
wxCommandEventHandler( PANEL_COMMON_SETTINGS::OnCanvasScaleChange ),
nullptr, this );
@@ -134,6 +136,7 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
commonSettings->m_Appearance.icon_theme = ICON_THEME::AUTO;
commonSettings->m_Appearance.use_icons_in_menus = m_checkBoxIconsInMenus->GetValue();
+ commonSettings->m_Appearance.apply_icon_scale_to_fonts = m_scaleFonts->GetValue();
commonSettings->m_Input.immediate_actions = !m_NonImmediateActions->GetValue();
commonSettings->m_Input.warp_mouse_on_move = m_warpMouseOnMove->GetValue();
@@ -217,6 +220,7 @@ void PANEL_COMMON_SETTINGS::applySettingsToPanel( COMMON_SETTINGS& aSettings )
}
m_checkBoxIconsInMenus->SetValue( aSettings.m_Appearance.use_icons_in_menus );
+ m_scaleFonts->SetValue( aSettings.m_Appearance.apply_icon_scale_to_fonts );
m_warpMouseOnMove->SetValue( aSettings.m_Input.warp_mouse_on_move );
m_NonImmediateActions->SetValue( !aSettings.m_Input.immediate_actions );
diff --git a/common/dialogs/panel_common_settings_base.cpp b/common/dialogs/panel_common_settings_base.cpp
index a17a95f50e..d946cde25c 100644
--- a/common/dialogs/panel_common_settings_base.cpp
+++ b/common/dialogs/panel_common_settings_base.cpp
@@ -17,83 +17,43 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
- wxGridBagSizer* gbSizer1;
- gbSizer1 = new wxGridBagSizer( 4, 4 );
- gbSizer1->SetFlexibleDirection( wxBOTH );
- gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- gbSizer1->SetEmptyCellSize( wxSize( -1,2 ) );
+ wxStaticBoxSizer* bAntiAliasing;
+ bAntiAliasing = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Antialiasing") ), wxVERTICAL );
- m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("&Auto save:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextautosave->Wrap( -1 );
- gbSizer1->Add( m_staticTextautosave, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
-
- wxBoxSizer* bSizer6;
- bSizer6 = new wxBoxSizer( wxHORIZONTAL );
-
- m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 );
- m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk.\nIf set to 0, auto backup is disabled") );
-
- bSizer6->Add( m_SaveTime, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxStaticText* minutesLabel;
- minutesLabel = new wxStaticText( this, wxID_ANY, _("minutes"), wxDefaultPosition, wxDefaultSize, 0 );
- minutesLabel->Wrap( -1 );
- bSizer6->Add( minutesLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
-
- gbSizer1->Add( bSizer6, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP, 5 );
-
- m_staticTextFileHistorySize = new wxStaticText( this, wxID_ANY, _("File history size:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextFileHistorySize->Wrap( -1 );
- gbSizer1->Add( m_staticTextFileHistorySize, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
-
- m_fileHistorySize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 0 );
- gbSizer1->Add( m_fileHistorySize, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextClear3DCache = new wxStaticText( this, wxID_ANY, _("3D cache file duration:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextClear3DCache->Wrap( -1 );
- gbSizer1->Add( m_staticTextClear3DCache, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
-
- wxBoxSizer* bSizer5;
- bSizer5 = new wxBoxSizer( wxHORIZONTAL );
-
- m_Clear3DCacheFilesOlder = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 120, 30 );
- m_Clear3DCacheFilesOlder->SetToolTip( _("3D cache files older than this are deleted.\nIf set to 0, cache clearing is disabled") );
-
- bSizer5->Add( m_Clear3DCacheFilesOlder, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextDays = new wxStaticText( this, wxID_ANY, _("Days"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDays->Wrap( -1 );
- bSizer5->Add( m_staticTextDays, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
-
-
- gbSizer1->Add( bSizer5, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
+ wxGridBagSizer* gbSizer11;
+ gbSizer11 = new wxGridBagSizer( 6, 4 );
+ gbSizer11->SetFlexibleDirection( wxBOTH );
+ gbSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ gbSizer11->SetEmptyCellSize( wxSize( -1,2 ) );
wxStaticText* antialiasingLabel;
- antialiasingLabel = new wxStaticText( this, wxID_ANY, _("Accelerated graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
+ antialiasingLabel = new wxStaticText( bAntiAliasing->GetStaticBox(), wxID_ANY, _("Accelerated graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
antialiasingLabel->Wrap( -1 );
- gbSizer1->Add( antialiasingLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+ gbSizer11->Add( antialiasingLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxString m_antialiasingChoices[] = { _("No Antialiasing"), _("Fast Antialiasing"), _("High Quality Antialiasing") };
int m_antialiasingNChoices = sizeof( m_antialiasingChoices ) / sizeof( wxString );
- m_antialiasing = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingNChoices, m_antialiasingChoices, 0 );
+ m_antialiasing = new wxChoice( bAntiAliasing->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingNChoices, m_antialiasingChoices, 0 );
m_antialiasing->SetSelection( 0 );
- gbSizer1->Add( m_antialiasing, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
+ gbSizer11->Add( m_antialiasing, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
- m_antialiasingFallbackLabel = new wxStaticText( this, wxID_ANY, _("Fallback graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_antialiasingFallbackLabel = new wxStaticText( bAntiAliasing->GetStaticBox(), wxID_ANY, _("Fallback graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
m_antialiasingFallbackLabel->Wrap( -1 );
- gbSizer1->Add( m_antialiasingFallbackLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+ gbSizer11->Add( m_antialiasingFallbackLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxString m_antialiasingFallbackChoices[] = { _("No Antialiasing"), _("Fast Antialiasing"), _("High Quality Antialiasing") };
int m_antialiasingFallbackNChoices = sizeof( m_antialiasingFallbackChoices ) / sizeof( wxString );
- m_antialiasingFallback = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingFallbackNChoices, m_antialiasingFallbackChoices, 0 );
+ m_antialiasingFallback = new wxChoice( bAntiAliasing->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingFallbackNChoices, m_antialiasingFallbackChoices, 0 );
m_antialiasingFallback->SetSelection( 0 );
- gbSizer1->Add( m_antialiasingFallback, wxGBPosition( 6, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
+ gbSizer11->Add( m_antialiasingFallback, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
- gbSizer1->AddGrowableCol( 1 );
+ gbSizer11->AddGrowableCol( 1 );
- bLeftSizer->Add( gbSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 10 );
+ bAntiAliasing->Add( gbSizer11, 0, wxEXPAND|wxBOTTOM, 5 );
+
+
+ bLeftSizer->Add( bAntiAliasing, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sizerHelperApps;
sizerHelperApps = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Helper Applications") ), wxVERTICAL );
@@ -150,65 +110,79 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
bLeftSizer->Add( sizerHelperApps, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizerIconsOpts;
- sbSizerIconsOpts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface") ), wxVERTICAL );
+ sbSizerIconsOpts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface") ), wxHORIZONTAL );
wxGridBagSizer* gbSizer4;
- gbSizer4 = new wxGridBagSizer( 2, 0 );
+ gbSizer4 = new wxGridBagSizer( 1, 0 );
gbSizer4->SetFlexibleDirection( wxBOTH );
gbSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- gbSizer4->SetEmptyCellSize( wxSize( -1,10 ) );
-
- m_staticTexticonscale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTexticonscale->Wrap( -1 );
- gbSizer4->Add( m_staticTexticonscale, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- m_iconScaleSlider = new STEPPED_SLIDER( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, 100, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_VALUE_LABEL );
- m_iconScaleSlider->SetMinSize( wxSize( 140,-1 ) );
-
- gbSizer4->Add( m_iconScaleSlider, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_iconScaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
- gbSizer4->Add( m_iconScaleAuto, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 15 );
-
- m_staticTextCanvasScale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Canvas scale:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCanvasScale->Wrap( -1 );
- gbSizer4->Add( m_staticTextCanvasScale, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_canvasScaleCtrl = new wxSpinCtrlDouble( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0, 1 );
- m_canvasScaleCtrl->SetDigits( 0 );
- gbSizer4->Add( m_canvasScaleCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_canvasScaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
- gbSizer4->Add( m_canvasScaleAuto, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 15 );
-
- m_checkBoxIconsInMenus = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Show icons in menus"), wxDefaultPosition, wxDefaultSize, 0 );
- gbSizer4->Add( m_checkBoxIconsInMenus, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
+ gbSizer4->SetEmptyCellSize( wxSize( -1,5 ) );
m_stIconTheme = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Icon theme:"), wxDefaultPosition, wxDefaultSize, 0 );
m_stIconTheme->Wrap( -1 );
- gbSizer4->Add( m_stIconTheme, wxGBPosition( 6, 0 ), wxGBSpan( 1, 3 ), wxLEFT|wxRIGHT, 5 );
+ gbSizer4->Add( m_stIconTheme, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5 );
m_rbIconThemeLight = new wxRadioButton( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Light"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_rbIconThemeLight->SetToolTip( _("Use icons designed for light window backgrounds") );
+ m_rbIconThemeLight->SetMinSize( wxSize( 100,-1 ) );
- gbSizer4->Add( m_rbIconThemeLight, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
+ gbSizer4->Add( m_rbIconThemeLight, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_rbIconThemeDark = new wxRadioButton( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Dark"), wxDefaultPosition, wxDefaultSize, 0 );
m_rbIconThemeDark->SetToolTip( _("Use icons designed for dark window backgrounds") );
+ m_rbIconThemeDark->SetMinSize( wxSize( 100,-1 ) );
- gbSizer4->Add( m_rbIconThemeDark, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
+ gbSizer4->Add( m_rbIconThemeDark, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_rbIconThemeAuto = new wxRadioButton( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
m_rbIconThemeAuto->SetValue( true );
m_rbIconThemeAuto->SetToolTip( _("Automatically choose light or dark icons based on the system color theme") );
- gbSizer4->Add( m_rbIconThemeAuto, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 15 );
+ gbSizer4->Add( m_rbIconThemeAuto, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
+
+ m_staticTexticonscale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTexticonscale->Wrap( -1 );
+ gbSizer4->Add( m_staticTexticonscale, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_iconScaleSlider = new STEPPED_SLIDER( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, 100, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_VALUE_LABEL );
+ gbSizer4->Add( m_iconScaleSlider, wxGBPosition( 2, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_iconScaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
+ gbSizer4->Add( m_iconScaleAuto, wxGBPosition( 2, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+
+ gbSizer4->Add( 0, 10, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
+
+ m_staticTextCanvasScale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Canvas scale:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCanvasScale->Wrap( -1 );
+ gbSizer4->Add( m_staticTextCanvasScale, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_canvasScaleCtrl = new wxSpinCtrlDouble( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0, 1 );
+ m_canvasScaleCtrl->SetDigits( 0 );
+ gbSizer4->Add( m_canvasScaleCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_canvasScaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
+ gbSizer4->Add( m_canvasScaleAuto, wxGBPosition( 5, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT, 5 );
+
+
+ gbSizer4->Add( 0, 10, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
+
+ m_checkBoxIconsInMenus = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Show icons in menus"), wxDefaultPosition, wxDefaultSize, 0 );
+ gbSizer4->Add( m_checkBoxIconsInMenus, wxGBPosition( 7, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+
+ m_scaleFonts = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Apply icon scaling to fonts"), wxDefaultPosition, wxDefaultSize, 0 );
+ gbSizer4->Add( m_scaleFonts, wxGBPosition( 8, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
+
+ m_fontScalingHelp = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("(This workaround will improve some GTK HiDPI font scaling issues.)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_fontScalingHelp->Wrap( -1 );
+ gbSizer4->Add( m_fontScalingHelp, wxGBPosition( 9, 0 ), wxGBSpan( 1, 5 ), wxLEFT, 5 );
gbSizer4->AddGrowableCol( 1 );
+ gbSizer4->AddGrowableCol( 2 );
gbSizer4->AddGrowableRow( 0 );
- sbSizerIconsOpts->Add( gbSizer4, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
+ sbSizerIconsOpts->Add( gbSizer4, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bLeftSizer->Add( sbSizerIconsOpts, 1, wxEXPAND|wxALL, 5 );
@@ -233,6 +207,66 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
rightSizer->Add( sbSizer4, 0, wxEXPAND|wxALL, 5 );
+ wxStaticBoxSizer* sbSizer5;
+ sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Session") ), wxVERTICAL );
+
+ m_cbRememberOpenFiles = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Remember open files for next project launch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_cbRememberOpenFiles->SetValue(true);
+ m_cbRememberOpenFiles->SetToolTip( _("If checked, launching a project will also launch tools such as eeschema and pcbnew with previously open files") );
+
+ sbSizer5->Add( m_cbRememberOpenFiles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ sbSizer5->Add( 0, 5, 0, 0, 5 );
+
+ wxGridBagSizer* gbSizer1;
+ gbSizer1 = new wxGridBagSizer( 4, 5 );
+ gbSizer1->SetFlexibleDirection( wxBOTH );
+ gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ gbSizer1->SetEmptyCellSize( wxSize( -1,2 ) );
+
+ m_staticTextautosave = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("&Auto save:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextautosave->Wrap( -1 );
+ gbSizer1->Add( m_staticTextautosave, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_SaveTime = new wxSpinCtrl( sbSizer5->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 );
+ m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk.\nIf set to 0, auto backup is disabled") );
+
+ gbSizer1->Add( m_SaveTime, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxStaticText* minutesLabel;
+ minutesLabel = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("minutes"), wxDefaultPosition, wxDefaultSize, 0 );
+ minutesLabel->Wrap( -1 );
+ gbSizer1->Add( minutesLabel, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextFileHistorySize = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("File history size:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFileHistorySize->Wrap( -1 );
+ gbSizer1->Add( m_staticTextFileHistorySize, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_fileHistorySize = new wxSpinCtrl( sbSizer5->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 0 );
+ gbSizer1->Add( m_fileHistorySize, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextClear3DCache = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("3D cache file duration:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextClear3DCache->Wrap( -1 );
+ gbSizer1->Add( m_staticTextClear3DCache, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_Clear3DCacheFilesOlder = new wxSpinCtrl( sbSizer5->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 120, 30 );
+ m_Clear3DCacheFilesOlder->SetToolTip( _("3D cache files older than this are deleted.\nIf set to 0, cache clearing is disabled") );
+
+ gbSizer1->Add( m_Clear3DCacheFilesOlder, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextDays = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("days"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDays->Wrap( -1 );
+ gbSizer1->Add( m_staticTextDays, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ gbSizer1->AddGrowableCol( 1 );
+
+ sbSizer5->Add( gbSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+ rightSizer->Add( sbSizer5, 0, wxALL|wxEXPAND, 5 );
+
wxStaticBoxSizer* sbSizer41;
sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Project Backup") ), wxVERTICAL );
@@ -258,7 +292,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
gbSizer3->Add( m_staticText9, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_backupLimitTotalFiles = new wxSpinCtrl( sbSizer41->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
- gbSizer3->Add( m_backupLimitTotalFiles, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ gbSizer3->Add( m_backupLimitTotalFiles, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_staticText10 = new wxStaticText( sbSizer41->GetStaticBox(), wxID_ANY, _("Maximum backups per day:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText10->Wrap( -1 );
@@ -267,7 +301,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
gbSizer3->Add( m_staticText10, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_backupLimitDailyFiles = new wxSpinCtrl( sbSizer41->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
- gbSizer3->Add( m_backupLimitDailyFiles, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ gbSizer3->Add( m_backupLimitDailyFiles, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_staticText11 = new wxStaticText( sbSizer41->GetStaticBox(), wxID_ANY, _("Minimum time between backups:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
@@ -276,7 +310,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
gbSizer3->Add( m_staticText11, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_backupMinInterval = new wxSpinCtrl( sbSizer41->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 3600, 0 );
- gbSizer3->Add( m_backupMinInterval, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ gbSizer3->Add( m_backupMinInterval, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticText15 = new wxStaticText( sbSizer41->GetStaticBox(), wxID_ANY, _("minutes"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText15->Wrap( -1 );
@@ -289,29 +323,19 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
gbSizer3->Add( m_staticText16, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_backupLimitTotalSize = new wxSpinCtrl( sbSizer41->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
- gbSizer3->Add( m_backupLimitTotalSize, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+ gbSizer3->Add( m_backupLimitTotalSize, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_staticText17 = new wxStaticText( sbSizer41->GetStaticBox(), wxID_ANY, _("MB"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText17->Wrap( -1 );
gbSizer3->Add( m_staticText17, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ gbSizer3->AddGrowableCol( 1 );
+
sbSizer41->Add( gbSizer3, 0, wxEXPAND|wxBOTTOM, 5 );
- rightSizer->Add( sbSizer41, 0, wxALL|wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer5;
- sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Session") ), wxVERTICAL );
-
- m_cbRememberOpenFiles = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Remember open files for next project launch"), wxDefaultPosition, wxDefaultSize, 0 );
- m_cbRememberOpenFiles->SetValue(true);
- m_cbRememberOpenFiles->SetToolTip( _("If checked, launching a project will also launch tools such as eeschema and pcbnew with previously open files") );
-
- sbSizer5->Add( m_cbRememberOpenFiles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
-
- rightSizer->Add( sbSizer5, 1, wxALL|wxEXPAND, 5 );
+ rightSizer->Add( sbSizer41, 1, wxALL|wxEXPAND, 5 );
bPanelSizer->Add( rightSizer, 0, wxALL|wxEXPAND, 5 );
diff --git a/common/dialogs/panel_common_settings_base.fbp b/common/dialogs/panel_common_settings_base.fbp
index 325b65b42c..9202cdb570 100644
--- a/common/dialogs/panel_common_settings_base.fbp
+++ b/common/dialogs/panel_common_settings_base.fbp
@@ -64,162 +64,39 @@
wxVERTICAL
none