cleanup related to zoom definitions
This commit is contained in:
parent
b7564f6f05
commit
fcce62f0a4
|
@ -198,11 +198,7 @@ void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
// change this config
|
// change this config
|
||||||
// if( aCfg->m_Window.zoom_factors.empty() )
|
// if( aCfg->m_Window.zoom_factors.empty() )
|
||||||
{
|
{
|
||||||
aCfg->m_Window.zoom_factors = { 0.05, 0.07,
|
aCfg->m_Window.zoom_factors = { ZOOM_LIST_EESCHEMA };
|
||||||
0.1, 0.15, 0.2, 0.3, 0.5, 0.7,
|
|
||||||
1.0, 1.5, 2.0, 3.0, 4.5, 6.5,
|
|
||||||
10.0, 15.0, 20.0, 30.0, 45.0, 65.0,
|
|
||||||
100.0 };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure factors < MAX_ZOOM_FACTOR (useful only when the user will be
|
// ensure factors < MAX_ZOOM_FACTOR (useful only when the user will be
|
||||||
|
|
|
@ -301,26 +301,7 @@ void GERBVIEW_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
|
|
||||||
if( aCfg->m_Window.zoom_factors.empty() )
|
if( aCfg->m_Window.zoom_factors.empty() )
|
||||||
{
|
{
|
||||||
aCfg->m_Window.zoom_factors = { 0.022,
|
aCfg->m_Window.zoom_factors = { ZOOM_LIST_GERBER };
|
||||||
0.035,
|
|
||||||
0.05,
|
|
||||||
0.08,
|
|
||||||
0.13,
|
|
||||||
0.22,
|
|
||||||
0.35,
|
|
||||||
0.6,
|
|
||||||
1.0,
|
|
||||||
2.2,
|
|
||||||
3.5,
|
|
||||||
5.0,
|
|
||||||
8.0,
|
|
||||||
13.0,
|
|
||||||
22.0,
|
|
||||||
35.0,
|
|
||||||
50.0,
|
|
||||||
80.0,
|
|
||||||
130.0,
|
|
||||||
220.0 };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for( double& factor : aCfg->m_Window.zoom_factors )
|
for( double& factor : aCfg->m_Window.zoom_factors )
|
||||||
|
|
|
@ -72,3 +72,16 @@
|
||||||
// Adjusted to display zoom level ~ 1 when the screen shows a 1:1 image.
|
// Adjusted to display zoom level ~ 1 when the screen shows a 1:1 image.
|
||||||
// Obviously depends on the monitor, but this is an acceptable value.
|
// Obviously depends on the monitor, but this is an acceptable value.
|
||||||
#define ZOOM_COEFF 1.1
|
#define ZOOM_COEFF 1.1
|
||||||
|
|
||||||
|
// List of predefined zooms used in zoom in/out from hotkeys and toolbar
|
||||||
|
#define ZOOM_LIST_GERBER 0.022, 0.035, 0.05, 0.08, 0.13, 0.22, 0.35, 0.6, 1.0,\
|
||||||
|
2.2, 3.5, 5.0, 8.0, 13.0, 22.0, 35.0, 50.0, 80.0, 130.0, 220.0
|
||||||
|
|
||||||
|
#define ZOOM_LIST_PCBNEW 0.13, 0.22, 0.35, 0.6, 1.0, 1.5, 2.2, 3.5, 5.0, 8.0, 13.0,\
|
||||||
|
20.0, 35.0, 50.0, 80.0, 130.0, 220.0, 300.0
|
||||||
|
|
||||||
|
#define ZOOM_LIST_PL_EDITOR 0.022, 0.035, 0.05, 0.08, 0.13, 0.22, 0.35, 0.6, 1.0, 2.2,\
|
||||||
|
3.5, 5.0, 8.0, 13.0, 22.0, 35.0, 50.0, 80.0, 130.0, 220.0
|
||||||
|
|
||||||
|
#define ZOOM_LIST_EESCHEMA 0.05, 0.07, 0.1, 0.15, 0.2, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0,\
|
||||||
|
3.0, 4.5, 6.5, 10.0, 15.0, 20.0, 30.0, 45.0, 65.0, 100.0
|
||||||
|
|
|
@ -482,28 +482,11 @@ void PL_EDITOR_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
"0.10 mm" };
|
"0.10 mm" };
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aCfg->m_Window.zoom_factors.empty() )
|
// Currently values read from config file are not used because the user cannot
|
||||||
|
// change this config
|
||||||
|
// if( aCfg->m_Window.zoom_factors.empty() )
|
||||||
{
|
{
|
||||||
aCfg->m_Window.zoom_factors = { 0.022,
|
aCfg->m_Window.zoom_factors = { ZOOM_LIST_PL_EDITOR };
|
||||||
0.035,
|
|
||||||
0.05,
|
|
||||||
0.08,
|
|
||||||
0.13,
|
|
||||||
0.22,
|
|
||||||
0.35,
|
|
||||||
0.6,
|
|
||||||
1.0,
|
|
||||||
2.2,
|
|
||||||
3.5,
|
|
||||||
5.0,
|
|
||||||
8.0,
|
|
||||||
13.0,
|
|
||||||
22.0,
|
|
||||||
35.0,
|
|
||||||
50.0,
|
|
||||||
80.0,
|
|
||||||
130.0,
|
|
||||||
220.0 };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for( double& factor : aCfg->m_Window.zoom_factors )
|
for( double& factor : aCfg->m_Window.zoom_factors )
|
||||||
|
|
|
@ -446,24 +446,7 @@ FOOTPRINT_PREVIEW_PANEL* FOOTPRINT_PREVIEW_PANEL::New( KIWAY* aKiway, wxWindow*
|
||||||
// change this config
|
// change this config
|
||||||
//if( cfg->m_Window.zoom_factors.empty() )
|
//if( cfg->m_Window.zoom_factors.empty() )
|
||||||
{
|
{
|
||||||
cfg->m_Window.zoom_factors = { 0.13,
|
cfg->m_Window.zoom_factors = { ZOOM_LIST_PCBNEW };
|
||||||
0.22,
|
|
||||||
0.35,
|
|
||||||
0.6,
|
|
||||||
1.0,
|
|
||||||
1.5,
|
|
||||||
2.2,
|
|
||||||
3.5,
|
|
||||||
5.0,
|
|
||||||
8.0,
|
|
||||||
13.0,
|
|
||||||
20.0,
|
|
||||||
35.0,
|
|
||||||
50.0,
|
|
||||||
80.0,
|
|
||||||
130.0,
|
|
||||||
220.0,
|
|
||||||
300.0 };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for( double& factor : cfg->m_Window.zoom_factors )
|
for( double& factor : cfg->m_Window.zoom_factors )
|
||||||
|
|
|
@ -600,24 +600,7 @@ void PCB_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
// change this config
|
// change this config
|
||||||
// if( aCfg->m_Window.zoom_factors.empty() )
|
// if( aCfg->m_Window.zoom_factors.empty() )
|
||||||
{
|
{
|
||||||
aCfg->m_Window.zoom_factors = { 0.13,
|
aCfg->m_Window.zoom_factors = { ZOOM_LIST_PCBNEW };
|
||||||
0.22,
|
|
||||||
0.35,
|
|
||||||
0.6,
|
|
||||||
1.0,
|
|
||||||
1.5,
|
|
||||||
2.2,
|
|
||||||
3.5,
|
|
||||||
5.0,
|
|
||||||
8.0,
|
|
||||||
13.0,
|
|
||||||
20.0,
|
|
||||||
35.0,
|
|
||||||
50.0,
|
|
||||||
80.0,
|
|
||||||
130.0,
|
|
||||||
220.0,
|
|
||||||
300.0 };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for( double& factor : aCfg->m_Window.zoom_factors )
|
for( double& factor : aCfg->m_Window.zoom_factors )
|
||||||
|
|
Loading…
Reference in New Issue