38#include <wx/filedlg.h>
78 static constexpr int dpi_scaling_precision = 1;
79 static constexpr double dpi_scaling_increment = 0.5;
88 _(
"Set the scale for the canvas."
90 "On high-DPI displays on some platforms, KiCad cannot determine the "
91 "scaling factor. In this case you may need to set this to a value to "
92 "match your system's DPI scaling. 2.0 is a common value. "
94 "If this does not match the system DPI scaling, the canvas will "
95 "not match the window size and cursor position." ) );
98 _(
"Use an automatic value for the canvas scale."
100 "On some platforms, the automatic value is incorrect and should be "
201 double dimmingPercent = 80;
253 msg << timevalue / 60;
339 if( !editorname.IsEmpty() )
351#if defined( __WINDOWS__ )
352 wxString msg =
_(
"Default 'explorer.exe /n,/select,%F' for this OS." );
356 wxString msg =
_(
"File explorer command.\nexample:" ) + wxS(
" 'nemo -n %F'" );
360 msg =
_(
"Explorer command with mandatory '%s' suffix after last entered character." );
368 wxString mask( wxT(
"*" ) );
371 mask += wxT(
".exe" );
374 wxString wildcard =
_(
"Executable files (" ) + mask + wxT(
")|" ) + mask;
379 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
381 wxFileDialog dlg( topLevelParent,
_(
"Select Preferred PDF Viewer" ), fn.GetPath(),
382 fn.GetFullPath(), wildcard, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
384 if( dlg.ShowModal() == wxID_CANCEL )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
Class to handle configuration and automatic determination of the DPI scale to use for canvases.
bool GetCanvasIsAutoScaled() const override
Is the current value auto scaled, or is it user-set in the config.
double GetScaleFactor() const override
Get the DPI scale from all known sources in order:
void SetDpiConfig(bool aAuto, double aValue) override
Set the common DPI config in a given config object.
static double GetDefaultScaleFactor()
Get the "default" scaling factor to use if not other config is available.
static double GetMaxScaleFactor()
static double GetMinScaleFactor()
void ResetToDefaults()
Resets all parameters to default values.
Class PANEL_COMMON_SETTINGS_BASE.
wxCheckBox * m_focusFollowSchPcb
wxCheckBox * m_cbBackupEnabled
wxCheckBox * m_hotkeyFeedback
wxRadioButton * m_rbIconThemeAuto
wxRadioButton * m_rbIconSizeLarge
wxTextCtrl * m_textEditorPath
wxRadioButton * m_rbIconThemeDark
wxRadioButton * m_rbIconThemeLight
wxCheckBox * m_NonImmediateActions
wxRadioButton * m_defaultPDFViewer
wxCheckBox * m_canvasScaleAuto
wxRadioButton * m_rbIconSizeNormal
wxCheckBox * m_scaleFonts
wxChoice * m_antialiasing
wxCheckBox * m_gridStriping
wxStaticText * m_staticTextCanvasScale
wxSpinCtrl * m_backupLimitTotalFiles
wxSpinCtrl * m_backupMinInterval
wxSpinCtrl * m_backupLimitDailyFiles
STD_BITMAP_BUTTON * m_pdfViewerBtn
wxStaticText * m_fontScalingHelp
wxStaticText * m_stIconTheme
wxStaticText * m_staticTextFileManager
wxRadioButton * m_otherPDFViewer
wxSpinCtrl * m_fileHistorySize
wxTextCtrl * m_highContrastCtrl
wxChoice * m_antialiasingFallback
wxRadioButton * m_rbIconSizeSmall
STD_BITMAP_BUTTON * m_textEditorBtn
wxSpinCtrl * m_Clear3DCacheFilesOlder
wxCheckBox * m_checkBoxIconsInMenus
wxSpinCtrlDouble * m_canvasScaleCtrl
wxCheckBox * m_cbBackupAutosave
wxTextCtrl * m_textCtrlFileManager
wxTextCtrl * m_PDFViewerPath
wxStaticText * m_antialiasingFallbackLabel
wxCheckBox * m_warpMouseOnMove
wxSpinCtrl * m_backupLimitTotalSize
wxCheckBox * m_showScrollbars
wxCheckBox * m_cbRememberOpenFiles
void OnTextEditorClick(wxCommandEvent &event) override
void setPdfViewerPathState()
bool TransferDataFromWindow() override
bool TransferDataToWindow() override
void OnCanvasScaleChange(wxCommandEvent &aEvent)
Event fired when the canvas scale field is modified.
void ShowFileManagerWidgets(bool aBool)
PANEL_COMMON_SETTINGS(wxWindow *aParent)
void applySettingsToPanel(COMMON_SETTINGS &aSettings)
void OnPDFViewerClick(wxCommandEvent &event) override
void OnCanvasScaleAuto(wxCommandEvent &aEvent) override
Event fired when the canvas auto-scale option is changed.
void ResetPanel() override
Reset the contents of this panel.
void OnRadioButtonPdfViewer(wxCommandEvent &event) override
~PANEL_COMMON_SETTINGS() override
virtual COMMON_SETTINGS * GetCommonSettings() const
virtual void SetPdfBrowserName(const wxString &aFileName)
virtual void ReadPdfBrowserInfos()
Read the PDF browser choice from the common configuration.
virtual const wxString & GetPdfBrowserName() const
virtual void SetTextEditor(const wxString &aFileName)
virtual void ForceSystemPdfBrowser(bool aFlg)
Force the use of system PDF browser, even if a preferred PDF browser is set.
virtual SETTINGS_MANAGER & GetSettingsManager() const
virtual void WritePdfBrowserInfos()
Save the PDF browser choice to the common configuration.
virtual const wxString AskUserForPreferredEditor(const wxString &aDefaultEditor=wxEmptyString)
Shows a dialog that instructs the user to select a new preferred editor.
const int minSize
Push and Shove router track width and via size dialog.
PGM_BASE & Pgm()
The global Program "get" accessor.
bool apply_icon_scale_to_fonts
double hicontrast_dimming_factor
int min_interval
Minimum time, in seconds, between subsequent backups.
bool backup_on_autosave
Trigger a backup on autosave.
unsigned long long limit_total_size
Maximum total size of backups (bytes), 0 for unlimited.
int limit_total_files
Maximum number of backup archives to retain.
int limit_daily_files
Maximum files to keep per day, 0 for unlimited.
bool enabled
Automatically back up the project when files are saved.
bool use_system_pdf_viewer
int clear_3d_cache_interval