Remove manual canvas scale from GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9912
This commit is contained in:
parent
62e6f542ed
commit
3cb7ca1db4
|
@ -181,6 +181,8 @@ static const wxChar ShowRepairSchematic[] = wxT( "ShowRepairSchematic" );
|
|||
|
||||
static const wxChar ShowEventCounters[] = wxT( "ShowEventCounters" );
|
||||
|
||||
static const wxChar AllowManualCanvasScale[] = wxT( "AllowManualCanvasScale" );
|
||||
|
||||
} // namespace KEYS
|
||||
|
||||
|
||||
|
@ -288,6 +290,7 @@ ADVANCED_CFG::ADVANCED_CFG()
|
|||
m_Skip3DModelMemoryCache = false;
|
||||
m_HideVersionFromTitle = false;
|
||||
m_ShowEventCounters = false;
|
||||
m_AllowManualCanvasScale = false;
|
||||
|
||||
loadFromConfigFile();
|
||||
}
|
||||
|
@ -406,6 +409,9 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowEventCounters,
|
||||
&m_ShowEventCounters, false ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::AllowManualCanvasScale,
|
||||
&m_AllowManualCanvasScale, false ) );
|
||||
|
||||
// Special case for trace mask setting...we just grab them and set them immediately
|
||||
// Because we even use wxLogTrace inside of advanced config
|
||||
wxString traceMasks = "";
|
||||
|
@ -416,6 +422,7 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
|
||||
// Now actually set the trace masks
|
||||
wxStringTokenizer traceMaskTokenizer( traceMasks, "," );
|
||||
|
||||
while( traceMaskTokenizer.HasMoreTokens() )
|
||||
{
|
||||
wxString mask = traceMaskTokenizer.GetNextToken();
|
||||
|
|
|
@ -95,10 +95,10 @@ PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aP
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Automatic canvas scaling works fine on Mac and MSW, and on GTK under wxWidgets 3.1 or
|
||||
* better.
|
||||
* Automatic canvas scaling works fine on all supported platforms, so manual scaling is disabled
|
||||
*/
|
||||
#if defined( __WXGTK__ ) && !wxCHECK_VERSION( 3, 1, 0 )
|
||||
if( ADVANCED_CFG::GetCfg().m_AllowManualCanvasScale )
|
||||
{
|
||||
static constexpr int dpi_scaling_precision = 1;
|
||||
static constexpr double dpi_scaling_increment = 0.5;
|
||||
|
||||
|
@ -123,12 +123,14 @@ PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aP
|
|||
"\n\n"
|
||||
"On some platforms, the automatic value is incorrect and should be "
|
||||
"set manually." ) );
|
||||
#else
|
||||
}
|
||||
else
|
||||
{
|
||||
m_staticTextCanvasScale->Show( false );
|
||||
m_canvasScaleCtrl->Show( false );
|
||||
m_canvasScaleCtrl = nullptr;
|
||||
m_canvasScaleAuto->Show( false );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Font scaling hacks are only needed on GTK under wxWidgets 3.0.
|
||||
|
|
|
@ -77,15 +77,10 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Automatic canvas scaling works fine on Mac and MSW, and on GTK under wxWidgets 3.1 or
|
||||
* better.
|
||||
* Automatic canvas scaling works fine on all supported platforms, so it's no longer exposed as
|
||||
* a configuration option.
|
||||
*/
|
||||
#if defined( __WXGTK__ ) && !wxCHECK_VERSION( 3, 1, 0 )
|
||||
m_params.emplace_back( new PARAM<double>( "appearance.canvas_scale",
|
||||
&m_Appearance.canvas_scale, 1.0 ) );
|
||||
#else
|
||||
m_Appearance.canvas_scale = 0.0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Menu icons are off by default on OSX and on for all other platforms.
|
||||
|
|
|
@ -202,6 +202,8 @@ public:
|
|||
*/
|
||||
bool m_ShowEventCounters;
|
||||
|
||||
bool m_AllowManualCanvasScale;
|
||||
|
||||
private:
|
||||
ADVANCED_CFG();
|
||||
|
||||
|
|
Loading…
Reference in New Issue