14PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWindowID
id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString&
name ) :
RESETTABLE_PANEL( parent, id, pos, size, style,
name )
16 wxBoxSizer* bPanelSizer;
17 bPanelSizer =
new wxBoxSizer( wxHORIZONTAL );
21 m_staticText20 =
new wxStaticText(
this, wxID_ANY,
_(
"Rendering Engine"), wxDefaultPosition, wxDefaultSize, 0 );
25 m_staticline3 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
35 wxString m_canvasTypeChoices[] = {
_(
"Accelerated Graphics") };
36 int m_canvasTypeNChoices =
sizeof( m_canvasTypeChoices ) /
sizeof( wxString );
37 m_canvasType =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_canvasTypeNChoices, m_canvasTypeChoices, 0 );
39 m_canvasType->SetToolTip(
_(
"Accelerated uses your GPU (recommended). Fallback uses software rendering for computers that do not support hardware acceleration. RHI is a new experimental GPU rendering engine (Vulkan, or Metal on macOS).") );
49 wxGridBagSizer* gbSizer11;
50 gbSizer11 =
new wxGridBagSizer( 0, 6 );
51 gbSizer11->SetFlexibleDirection( wxBOTH );
52 gbSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
53 gbSizer11->SetEmptyCellSize( wxSize( -1,2 ) );
55 wxStaticText* antialiasingLabel;
56 antialiasingLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Antialiasing:"), wxDefaultPosition, wxDefaultSize, 0 );
57 antialiasingLabel->Wrap( -1 );
58 gbSizer11->Add( antialiasingLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
60 wxString m_antialiasingChoices[] = {
_(
"No Antialiasing"),
_(
"Fast Antialiasing"),
_(
"High Quality Antialiasing") };
61 int m_antialiasingNChoices =
sizeof( m_antialiasingChoices ) /
sizeof( wxString );
62 m_antialiasing =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingNChoices, m_antialiasingChoices, 0 );
64 gbSizer11->Add(
m_antialiasing, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
67 gbSizer11->AddGrowableCol( 1 );
71 wxBoxSizer* bAntialiasingSizer;
72 bAntialiasingSizer =
new wxBoxSizer( wxVERTICAL );
75 bLeftSizer->Add( bAntialiasingSizer, 0, wxTOP|wxLEFT|wxEXPAND, 5 );
80 m_staticText21 =
new wxStaticText(
this, wxID_ANY,
_(
"Helper Applications"), wxDefaultPosition, wxDefaultSize, 0 );
84 m_staticline2 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
87 wxBoxSizer* bHelperAppsSizer;
88 bHelperAppsSizer =
new wxBoxSizer( wxVERTICAL );
91 bSizer61 =
new wxBoxSizer( wxHORIZONTAL );
93 wxStaticText* textEditorLabel;
94 textEditorLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text editor:"), wxDefaultPosition, wxDefaultSize, 0 );
95 textEditorLabel->Wrap( -1 );
96 bSizer61->Add( textEditorLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
98 m_textEditorPath =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
105 bHelperAppsSizer->Add( bSizer61, 0, wxTOP|wxRIGHT|wxEXPAND, 5 );
108 bHelperAppsSizer->Add( 0, 4, 0, wxEXPAND, 5 );
112 m_staticTextFileManager =
new wxStaticText(
this, wxID_ANY,
_(
"File manager:"), wxDefaultPosition, wxDefaultSize, 0 );
116 m_textCtrlFileManager =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
123 bHelperAppsSizer->Add( 0, 12, 1, wxEXPAND, 5 );
126 bSizer8 =
new wxBoxSizer( wxVERTICAL );
128 m_defaultPDFViewer =
new wxRadioButton(
this, wxID_ANY,
_(
"System default PDF viewer"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
132 bHelperAppsSizer->Add( bSizer8, 0, wxBOTTOM|wxEXPAND, 2 );
135 bSizer7 =
new wxBoxSizer( wxHORIZONTAL );
137 m_otherPDFViewer =
new wxRadioButton(
this, wxID_ANY,
_(
"Other:"), wxDefaultPosition, wxDefaultSize, 0 );
138 bSizer7->Add(
m_otherPDFViewer, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
140 m_PDFViewerPath =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
147 bHelperAppsSizer->Add( bSizer7, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
150 bLeftSizer->Add( bHelperAppsSizer, 0, wxTOP|wxLEFT|wxEXPAND, 5 );
155 m_staticText22 =
new wxStaticText(
this, wxID_ANY,
_(
"User Interface"), wxDefaultPosition, wxDefaultSize, 0 );
159 m_staticline1 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
162 wxBoxSizer* bUserInterfaceSizer;
163 bUserInterfaceSizer =
new wxBoxSizer( wxVERTICAL );
165 wxBoxSizer* bSizer14;
166 bSizer14 =
new wxBoxSizer( wxVERTICAL );
168 m_checkBoxIconsInMenus =
new wxCheckBox(
this, wxID_ANY,
_(
"Show icons in menus"), wxDefaultPosition, wxDefaultSize, 0 );
171 m_showScrollbars =
new wxCheckBox(
this, wxID_ANY,
_(
"Show scrollbars in editors"), wxDefaultPosition, wxDefaultSize, 0 );
173 m_showScrollbars->SetToolTip(
_(
"This change takes effect when relaunching the editor.") );
177 m_focusFollowSchPcb =
new wxCheckBox(
this, wxID_ANY,
_(
"Focus follows mouse between schematic and PCB editors"), wxDefaultPosition, wxDefaultSize, 0 );
178 m_focusFollowSchPcb->SetToolTip(
_(
"If the mouse cursor is moved over the canvas of a schematic or PCB editor window, that window is raised.") );
182 m_hotkeyFeedback =
new wxCheckBox(
this, wxID_ANY,
_(
"Show popup indicator when toggling settings with hotkeys"), wxDefaultPosition, wxDefaultSize, 0 );
183 m_hotkeyFeedback->SetToolTip(
_(
"When enabled, certain hotkeys that cycle between settings will show a popup indicator briefly to indicate the change in settings.") );
187 m_gridStriping =
new wxCheckBox(
this, wxID_ANY,
_(
"Use alternating row colors in tables"), wxDefaultPosition, wxDefaultSize, 0 );
188 m_gridStriping->SetToolTip(
_(
"When enabled, use a different color for every other table row") );
193 bUserInterfaceSizer->Add( bSizer14, 0, wxEXPAND, 5 );
195 m_disableCustomCursors =
new wxCheckBox(
this, wxID_ANY,
_(
"Disable custom cursors"), wxDefaultPosition, wxDefaultSize, 0 );
196 m_disableCustomCursors->SetToolTip(
_(
"When enabled, KiCad will use default system cursors instead of custom ones") );
200 wxBoxSizer* bSizerIconsTheme;
201 bSizerIconsTheme =
new wxBoxSizer( wxHORIZONTAL );
203 m_stIconTheme =
new wxStaticText(
this, wxID_ANY,
_(
"Icon theme:"), wxDefaultPosition, wxDefaultSize, 0 );
207 m_rbIconThemeLight =
new wxRadioButton(
this, wxID_ANY,
_(
"Light"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
212 m_rbIconThemeDark =
new wxRadioButton(
this, wxID_ANY,
_(
"Dark"), wxDefaultPosition, wxDefaultSize, 0 );
217 m_rbIconThemeAuto =
new wxRadioButton(
this, wxID_ANY,
_(
"Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
219 m_rbIconThemeAuto->SetToolTip(
_(
"Automatically choose light or dark icons based on the system color theme") );
224 bUserInterfaceSizer->Add( bSizerIconsTheme, 0, wxEXPAND|wxTOP, 5 );
226 wxBoxSizer* bSizerToolbarSize;
227 bSizerToolbarSize =
new wxBoxSizer( wxHORIZONTAL );
229 m_stToolbarIconSize =
new wxStaticText(
this, wxID_ANY,
_(
"Toolbar icon size:"), wxDefaultPosition, wxDefaultSize, 0 );
233 m_rbIconSizeSmall =
new wxRadioButton(
this, wxID_ANY,
_(
"Small"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
238 m_rbIconSizeNormal =
new wxRadioButton(
this, wxID_ANY,
_(
"Normal"), wxDefaultPosition, wxDefaultSize, 0 );
243 m_rbIconSizeLarge =
new wxRadioButton(
this, wxID_ANY,
_(
"Large"), wxDefaultPosition, wxDefaultSize, 0 );
249 bUserInterfaceSizer->Add( bSizerToolbarSize, 0, wxEXPAND, 5 );
251 m_scaleFonts =
new wxCheckBox(
this, wxID_ANY,
_(
"Apply icon scaling to fonts"), wxDefaultPosition, wxDefaultSize, 0 );
252 bUserInterfaceSizer->Add(
m_scaleFonts, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
254 m_fontScalingHelp =
new wxStaticText(
this, wxID_ANY,
_(
"(This workaround will improve some GTK HiDPI font scaling issues.)"), wxDefaultPosition, wxDefaultSize, 0 );
262 m_staticTextCanvasScale =
new wxStaticText(
this, wxID_ANY,
_(
"Canvas scale:"), wxDefaultPosition, wxDefaultSize, 0 );
266 m_canvasScaleCtrl =
new wxSpinCtrlDouble(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0, 1 );
270 m_canvasScaleAuto =
new wxCheckBox(
this, wxID_ANY,
_(
"Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
274 bUserInterfaceSizer->Add(
m_gbUserInterface, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
276 wxBoxSizer* bSizerHighContrast;
277 bSizerHighContrast =
new wxBoxSizer( wxHORIZONTAL );
279 m_highContrastLabel =
new wxStaticText(
this, wxID_ANY,
_(
"High-contrast mode dimming factor:"), wxDefaultPosition, wxDefaultSize, 0 );
281 bSizerHighContrast->Add(
m_highContrastLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
283 m_highContrastCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
286 m_highContrastUnits =
new wxStaticText(
this, wxID_ANY,
_(
"%"), wxDefaultPosition, wxDefaultSize, 0 );
288 bSizerHighContrast->Add(
m_highContrastUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
291 bUserInterfaceSizer->Add( bSizerHighContrast, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
293 wxBoxSizer* bSizerAppTheme;
294 bSizerAppTheme =
new wxBoxSizer( wxHORIZONTAL );
296 m_stAppTheme =
new wxStaticText(
this, wxID_ANY,
_(
"App theme:"), wxDefaultPosition, wxDefaultSize, 0 );
300 m_rbAppThemeLight =
new wxRadioButton(
this, wxID_ANY,
_(
"Light"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
301 m_rbAppThemeLight->SetToolTip(
_(
"Use icons designed for light window backgrounds") );
305 m_rbAppThemeDark =
new wxRadioButton(
this, wxID_ANY,
_(
"Dark"), wxDefaultPosition, wxDefaultSize, 0 );
306 m_rbAppThemeDark->SetToolTip(
_(
"Use icons designed for dark window backgrounds") );
310 m_rbAppThemeAuto =
new wxRadioButton(
this, wxID_ANY,
_(
"Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
312 m_rbAppThemeAuto->SetToolTip(
_(
"Automatically choose light or dark icons based on the system color theme") );
317 bUserInterfaceSizer->Add( bSizerAppTheme, 1, wxEXPAND, 5 );
320 bLeftSizer->Add( bUserInterfaceSizer, 0, wxTOP|wxLEFT|wxEXPAND, 5 );
323 bPanelSizer->Add(
bLeftSizer, 0, wxRIGHT, 35 );
325 wxBoxSizer* rightSizer;
326 rightSizer =
new wxBoxSizer( wxVERTICAL );
328 m_staticText251 =
new wxStaticText(
this, wxID_ANY,
_(
"Scaling"), wxDefaultPosition, wxDefaultSize, 0 );
330 rightSizer->Add(
m_staticText251, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 13 );
332 m_staticline7 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
338 rightSizer->Add(
m_scalingSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
341 rightSizer->Add( 0, 15, 0, wxEXPAND, 5 );
343 m_staticText23 =
new wxStaticText(
this, wxID_ANY,
_(
"Editing"), wxDefaultPosition, wxDefaultSize, 0 );
345 rightSizer->Add(
m_staticText23, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 13 );
347 m_staticline6 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
348 rightSizer->Add(
m_staticline6, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
350 wxBoxSizer* bEditingSizer;
351 bEditingSizer =
new wxBoxSizer( wxVERTICAL );
353 m_warpMouseOnMove =
new wxCheckBox(
this, wxID_ANY,
_(
"Warp mouse to anchor of moved object"), wxDefaultPosition, wxDefaultSize, 0 );
357 m_NonImmediateActions =
new wxCheckBox(
this, wxID_ANY,
_(
"First hotkey selects tool"), wxDefaultPosition, wxDefaultSize, 0 );
358 m_NonImmediateActions->SetToolTip(
_(
"If not checked, hotkeys will immediately perform an action even if the relevant tool was not previously selected.") );
363 rightSizer->Add( bEditingSizer, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
366 rightSizer->Add( 0, 15, 0, wxEXPAND, 5 );
368 m_staticText24 =
new wxStaticText(
this, wxID_ANY,
_(
"Session"), wxDefaultPosition, wxDefaultSize, 0 );
370 rightSizer->Add(
m_staticText24, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 13 );
372 m_staticline5 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
373 rightSizer->Add(
m_staticline5, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
375 wxBoxSizer* bSessionSizer;
376 bSessionSizer =
new wxBoxSizer( wxVERTICAL );
378 m_cbRememberOpenFiles =
new wxCheckBox(
this, wxID_ANY,
_(
"Remember open files for next project launch"), wxDefaultPosition, wxDefaultSize, 0 );
380 m_cbRememberOpenFiles->SetToolTip(
_(
"If checked, launching a project will also launch tools such as the schematic and board editors with previously open files") );
385 bSessionSizer->Add( 0, 5, 0, 0, 5 );
387 wxGridBagSizer* gbSizer1;
388 gbSizer1 =
new wxGridBagSizer( 5, 5 );
389 gbSizer1->SetFlexibleDirection( wxBOTH );
390 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
391 gbSizer1->SetEmptyCellSize( wxSize( -1,2 ) );
397 m_fileHistorySize =
new wxSpinCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 0 );
398 gbSizer1->Add(
m_fileHistorySize, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
401 gbSizer1->AddGrowableCol( 1 );
403 bSessionSizer->Add( gbSizer1, 0, wxALL, 5 );
406 rightSizer->Add( bSessionSizer, 0, wxTOP|wxLEFT|wxEXPAND, 5 );
409 rightSizer->Add( 0, 15, 0, wxEXPAND, 5 );
411 m_staticText25 =
new wxStaticText(
this, wxID_ANY,
_(
"Project Backup"), wxDefaultPosition, wxDefaultSize, 0 );
413 rightSizer->Add(
m_staticText25, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 13 );
415 m_staticline4 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
416 rightSizer->Add(
m_staticline4, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
418 wxBoxSizer* bProjectBackupSizer;
419 bProjectBackupSizer =
new wxBoxSizer( wxVERTICAL );
421 wxGridBagSizer* gbSizer3;
422 gbSizer3 =
new wxGridBagSizer( 2, 0 );
423 gbSizer3->SetFlexibleDirection( wxBOTH );
424 gbSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
426 m_cbBackupEnabled =
new wxCheckBox(
this, wxID_ANY,
_(
"Automatically backup projects"), wxDefaultPosition, wxDefaultSize, 0 );
427 m_cbBackupEnabled->SetToolTip(
_(
"Automatically create backup archives of the current project when saving files") );
429 gbSizer3->Add(
m_cbBackupEnabled, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT, 5 );
433 gbSizer3->Add(
m_staticTextBackupFormat, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 3 );
435 wxString m_choiceBackupFormatChoices[] = {
_(
"Incremental"),
_(
"Zip archive") };
436 int m_choiceBackupFormatNChoices =
sizeof( m_choiceBackupFormatChoices ) /
sizeof( wxString );
437 m_choiceBackupFormat =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceBackupFormatNChoices, m_choiceBackupFormatChoices, 0 );
439 m_choiceBackupFormat->SetToolTip(
_(
"Incremental: maintain a hidden .history git repository with continuous changes.\nZip: create timestamped zip archives on save; autosave uses recovery files.") );
441 gbSizer3->Add(
m_choiceBackupFormat, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 3 );
445 gbSizer3->Add(
m_staticTextBackupLocation, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 3 );
447 wxString m_choiceBackupLocationChoices[] = {
_(
"Project directory"),
_(
"User data directory") };
448 int m_choiceBackupLocationNChoices =
sizeof( m_choiceBackupLocationChoices ) /
sizeof( wxString );
449 m_choiceBackupLocation =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceBackupLocationNChoices, m_choiceBackupLocationChoices, 0 );
451 m_choiceBackupLocation->SetToolTip(
_(
"Project: store backups and autosave files inside the project directory.\nUser: store them in your KiCad user data directory.") );
453 gbSizer3->Add(
m_choiceBackupLocation, wxGBPosition( 2, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 3 );
455 m_staticText16 =
new wxStaticText(
this, wxID_ANY,
_(
"Maximum total backup size:"), wxDefaultPosition, wxDefaultSize, 0 );
457 m_staticText16->SetToolTip(
_(
"If the total size of backup files grows above this limit, old backups will be deleted (set to 0 for no limit)") );
459 gbSizer3->Add(
m_staticText16, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 3 );
461 m_backupLimitTotalSize =
new wxSpinCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
462 gbSizer3->Add(
m_backupLimitTotalSize, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 3 );
464 m_staticText17 =
new wxStaticText(
this, wxID_ANY,
_(
"MB"), wxDefaultPosition, wxDefaultSize, 0 );
466 gbSizer3->Add(
m_staticText17, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
469 gbSizer3->AddGrowableCol( 1 );
471 bProjectBackupSizer->Add( gbSizer3, 0, wxALL, 5 );
474 rightSizer->Add( bProjectBackupSizer, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
477 bPanelSizer->Add( rightSizer, 1, wxLEFT|wxRIGHT, 5 );
480 this->SetSizer( bPanelSizer );
482 bPanelSizer->Fit(
this );