39#include <wx/filedlg.h>
85 static constexpr int dpi_scaling_precision = 1;
86 static constexpr double dpi_scaling_increment = 0.5;
96 "On high-DPI displays on some platforms, KiCad cannot determine the "
97 "scaling factor. In this case you may need to set this to a value to "
98 "match your system's DPI scaling. 2.0 is a common value. "
100 "If this does not match the system DPI scaling, the canvas will "
101 "not match the window size and cursor position." ) );
105 "On some platforms, the automatic value is incorrect and should be "
117 Pgm().GetCommonSettings()->m_Appearance.zoom_correction_factor,
224 double dimmingPercent = 80;
361 if( !editorname.IsEmpty() )
373#if defined( __WINDOWS__ )
374 wxString msg =
_(
"Default 'explorer.exe /n,/select,%F' for this OS." );
378 wxString msg =
_(
"File explorer command.\nexample:" ) + wxS(
" 'nemo -n %F'" );
382 msg =
_(
"Explorer command with mandatory '%s' suffix after last entered character." );
390 wxString mask( wxT(
"*" ) );
393 mask += wxT(
".exe" );
396 wxString wildcard =
_(
"Executable files (" ) + mask + wxT(
")|" ) + mask;
401 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
403 wxFileDialog dlg( topLevelParent,
_(
"Select Preferred PDF Viewer" ), fn.GetPath(),
404 fn.GetFullPath(), wildcard, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
408 if( dlg.ShowModal() == wxID_CANCEL )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
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()
Get the maximum scaling factor that should be presented to the user.
static double GetMinScaleFactor()
Get the minimum scaling factor that should be presented to the user.
@ GAL_TYPE_OPENGL
OpenGL implementation.
@ GAL_TYPE_CAIRO
Cairo implementation.
void ResetToDefaults()
Resets all parameters to default values.
wxBoxSizer * m_scalingSizer
wxCheckBox * m_focusFollowSchPcb
wxCheckBox * m_disableCustomCursors
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
wxStaticText * m_stAppTheme
wxChoice * m_antialiasing
wxCheckBox * m_gridStriping
wxStaticText * m_staticTextCanvasScale
PANEL_COMMON_SETTINGS_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)
wxRadioButton * m_rbAccelerated
STD_BITMAP_BUTTON * m_pdfViewerBtn
wxStaticText * m_fontScalingHelp
wxStaticText * m_stIconTheme
wxStaticText * m_staticTextFileManager
wxRadioButton * m_otherPDFViewer
wxSpinCtrl * m_fileHistorySize
wxTextCtrl * m_highContrastCtrl
wxRadioButton * m_rbIconSizeSmall
wxFlexGridSizer * m_renderingSizer
STD_BITMAP_BUTTON * m_textEditorBtn
wxCheckBox * m_checkBoxIconsInMenus
wxSpinCtrlDouble * m_canvasScaleCtrl
wxTextCtrl * m_textCtrlFileManager
wxTextCtrl * m_PDFViewerPath
wxCheckBox * m_warpMouseOnMove
wxSpinCtrl * m_backupLimitTotalSize
wxCheckBox * m_showScrollbars
wxRadioButton * m_rbAppThemeAuto
wxRadioButton * m_rbAppThemeLight
wxRadioButton * m_rbAppThemeDark
wxRadioButton * m_rbFallback
wxCheckBox * m_cbRememberOpenFiles
void OnTextEditorClick(wxCommandEvent &event) override
void setPdfViewerPathState()
bool TransferDataFromWindow() override
ZOOM_CORRECTION_CTRL * m_zoomCorrectionCtrl
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)
Show a dialog that instructs the user to select a new preferred editor.
Control to calibrate screen zoom to match real-world size.
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 zoom_correction_factor
double hicontrast_dimming_factor
unsigned long long limit_total_size
Maximum total size of backups (bytes), 0 for unlimited.
bool enabled
Automatically back up the project when files are saved.
int canvas_type
EDA_DRAW_PANEL_GAL::GAL_TYPE_* value, see gal_options_panel.cpp.
bool use_system_pdf_viewer