Gerbview: rename diff mode by forced opacity display mode and make opacity adjustable.
The diff mode (option in left toolbar) was never a differential display mode. It is actually an option to force the alpha channel (opacity) of layer colors to a given value. So change the name and tool tips to force opacity mode, and make the opacity parameter adjustable in preferences. Gerbview: cleanup: remove a old and dead code.
This commit is contained in:
parent
55b2c4dbf4
commit
93bd2c73ff
|
@ -59,6 +59,7 @@ void PANEL_GERBVIEW_DISPLAY_OPTIONS::loadSettings( GERBVIEW_SETTINGS* aCfg )
|
|||
m_OptDisplayLines->SetValue( !aCfg->m_Display.m_DisplayLinesFill );
|
||||
m_OptDisplayFlashedItems->SetValue( !aCfg->m_Display.m_DisplayFlashedItemsFill );
|
||||
m_OptDisplayDCodes->SetValue( aCfg->m_Appearance.show_dcodes );
|
||||
m_spOpacityCtrl->SetValue( aCfg->m_Display.m_OpacityModeAlphaValue );
|
||||
|
||||
for( unsigned i = 0; i < arrayDim( gerberPageSizeList ); ++i )
|
||||
{
|
||||
|
@ -98,6 +99,7 @@ bool PANEL_GERBVIEW_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
|
||||
cfg->m_Appearance.page_type = gerberPageSizeList[ m_PageSize->GetSelection() ];
|
||||
cfg->m_Display.m_DisplayPageLimits = m_ShowPageLimitsOpt->GetValue();
|
||||
cfg->m_Display.m_OpacityModeAlphaValue = m_spOpacityCtrl->GetValue();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf02)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -58,14 +58,35 @@ PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE( wxWind
|
|||
bDrawingModeSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_OptDisplayFlashedItems = new wxCheckBox( this, wxID_ANY, _("Sketch flashed items"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_OptDisplayFlashedItems->SetToolTip( _("Display flashed items (items drawn using standard or macro apertures) in outlines mode") );
|
||||
|
||||
bDrawingModeSizer->Add( m_OptDisplayFlashedItems, 0, wxALL, 5 );
|
||||
|
||||
m_OptDisplayLines = new wxCheckBox( this, wxID_ANY, _("Sketch lines"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bDrawingModeSizer->Add( m_OptDisplayLines, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_OptDisplayPolygons = new wxCheckBox( this, wxID_ANY, _("Sketch polygons"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_OptDisplayPolygons->SetValue(true);
|
||||
m_OptDisplayPolygons->SetToolTip( _("Display polygon items in outline mode") );
|
||||
|
||||
bDrawingModeSizer->Add( m_OptDisplayPolygons, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerOpacity;
|
||||
sbSizerOpacity = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Forced Opacity Display Mode") ), wxHORIZONTAL );
|
||||
|
||||
m_staticTextOpacity = new wxStaticText( sbSizerOpacity->GetStaticBox(), wxID_ANY, _("Forced opacity:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextOpacity->Wrap( -1 );
|
||||
m_staticTextOpacity->SetToolTip( _("Opacity in forced opacity display mode") );
|
||||
|
||||
sbSizerOpacity->Add( m_staticTextOpacity, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spOpacityCtrl = new wxSpinCtrlDouble( sbSizerOpacity->GetStaticBox(), wxID_ANY, wxT("0.6"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0.2, 1, 0.600000, 0.1 );
|
||||
m_spOpacityCtrl->SetDigits( 2 );
|
||||
sbSizerOpacity->Add( m_spOpacityCtrl, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bDrawingModeSizer->Add( sbSizerOpacity, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
bRightSizer->Add( bDrawingModeSizer, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
|
||||
|
||||
|
@ -106,7 +127,6 @@ PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE( wxWind
|
|||
|
||||
this->SetSizer( bDialogSizer );
|
||||
this->Layout();
|
||||
bDialogSizer->Fit( this );
|
||||
}
|
||||
|
||||
PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::~PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="16" />
|
||||
<object class="Project" expanded="1">
|
||||
<FileVersion major="1" minor="17"/>
|
||||
<object class="Project" expanded="true">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
|
@ -29,12 +29,13 @@
|
|||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Panel" expanded="1">
|
||||
<object class="Panel" expanded="true">
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -45,52 +46,52 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="size">257,534</property>
|
||||
<property name="subclass">RESETTABLE_PANEL; widgets/resettable_panel.h; Not forward_declare</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="two_step_creation">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bDialogSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_UpperSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">protected</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">20</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_galOptionsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">protected</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bRightSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">13</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -111,6 +112,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -147,11 +149,11 @@
|
|||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<object class="wxStaticLine" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -172,6 +174,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -205,20 +208,20 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bAnnotationsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -240,6 +243,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -278,11 +282,11 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -304,6 +308,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -344,21 +349,21 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<object class="spacer" expanded="true">
|
||||
<property name="height">15</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">13</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -379,6 +384,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -415,11 +421,11 @@
|
|||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<object class="wxStaticLine" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -440,6 +446,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -473,20 +480,20 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bDrawingModeSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -508,6 +515,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -536,7 +544,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="tooltip">Display flashed items (items drawn using standard or macro apertures) in outlines mode</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -546,11 +554,11 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -572,6 +580,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -610,11 +619,11 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -628,7 +637,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="checked">1</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -636,6 +645,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -664,7 +674,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="tooltip">Display polygon items in outline mode</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -674,23 +684,23 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="true">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Forced Opacity Display Mode</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizerOpacity</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">15</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">13</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -711,6 +721,148 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Forced opacity:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticTextOpacity</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Opacity in forced opacity display mode</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrlDouble" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="inc">0.1</property>
|
||||
<property name="initial">0.600000</property>
|
||||
<property name="max">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">0.2</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_spOpacityCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxSP_ARROW_KEYS</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="value">0.6</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="true">
|
||||
<property name="height">15</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">13</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -747,11 +899,11 @@
|
|||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<object class="wxStaticLine" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -772,6 +924,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -805,29 +958,29 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bPageSizeSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bMargins</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<object class="wxRadioBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -849,6 +1002,7 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf02)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -20,6 +20,8 @@
|
|||
#include <wx/settings.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
|
@ -45,13 +47,15 @@ class PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE : public RESETTABLE_PANEL
|
|||
wxCheckBox* m_OptDisplayFlashedItems;
|
||||
wxCheckBox* m_OptDisplayLines;
|
||||
wxCheckBox* m_OptDisplayPolygons;
|
||||
wxStaticText* m_staticTextOpacity;
|
||||
wxSpinCtrlDouble* m_spOpacityCtrl;
|
||||
wxStaticText* m_staticText3;
|
||||
wxStaticLine* m_staticline3;
|
||||
wxRadioBox* m_PageSize;
|
||||
|
||||
public:
|
||||
|
||||
PANEL_GERBVIEW_DISPLAY_OPTIONS_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 );
|
||||
PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 257,534 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE();
|
||||
|
||||
|
|
|
@ -40,13 +40,14 @@ public:
|
|||
bool m_DisplayPolygonsFill; ///< Option to draw polygons (filled/sketch)
|
||||
bool m_DisplayPageLimits;
|
||||
bool m_IsPrinting; ///< true when printing a page, false when drawing on screen
|
||||
bool m_DiffMode; ///< Display layers in diff mode
|
||||
bool m_ForceOpacityMode; ///< Display layers in transparency (alpha channel) forced mode
|
||||
bool m_XORMode; ///< Display layers in exclusive-or mode
|
||||
bool m_HighContrastMode; ///< High contrast mode (dim un-highlighted objects)
|
||||
bool m_FlipGerberView; ///< Display as a mirror image
|
||||
COLOR4D m_NegativeDrawColor; ///< The color used to draw negative objects, usually the
|
||||
///< background color, but not always, when negative objects
|
||||
///< must be visible
|
||||
double m_OpacityModeAlphaValue; ///< the alpha channel (opacity) value in opacity forced mode
|
||||
|
||||
public:
|
||||
GBR_DISPLAY_OPTIONS()
|
||||
|
@ -57,7 +58,8 @@ public:
|
|||
m_DisplayPageLimits = false;
|
||||
m_IsPrinting = false;
|
||||
m_NegativeDrawColor = COLOR4D( DARKGRAY );
|
||||
m_DiffMode = false;
|
||||
m_ForceOpacityMode = false;
|
||||
m_OpacityModeAlphaValue = 0.6;
|
||||
m_XORMode = false;
|
||||
m_HighContrastMode = false;
|
||||
m_FlipGerberView = false;
|
||||
|
|
|
@ -1146,10 +1146,10 @@ void GERBVIEW_FRAME::setupUIConditions()
|
|||
return gvconfig()->m_Appearance.show_dcodes;
|
||||
};
|
||||
|
||||
auto diffModeCond =
|
||||
auto forceOpacityModeCond =
|
||||
[this] ( const SELECTION& )
|
||||
{
|
||||
return gvconfig()->m_Display.m_DiffMode;
|
||||
return gvconfig()->m_Display.m_ForceOpacityMode;
|
||||
};
|
||||
|
||||
auto xorModeCond =
|
||||
|
@ -1181,7 +1181,7 @@ void GERBVIEW_FRAME::setupUIConditions()
|
|||
mgr->SetConditions( GERBVIEW_ACTIONS::polygonsDisplayOutlines, CHECK( polygonsFilledCond ) );
|
||||
mgr->SetConditions( GERBVIEW_ACTIONS::negativeObjectDisplay, CHECK( negativeObjectsCond ) );
|
||||
mgr->SetConditions( GERBVIEW_ACTIONS::dcodeDisplay, CHECK( dcodeCond ) );
|
||||
mgr->SetConditions( GERBVIEW_ACTIONS::toggleDiffMode, CHECK( diffModeCond ) );
|
||||
mgr->SetConditions( GERBVIEW_ACTIONS::toggleForceOpacityMode, CHECK( forceOpacityModeCond ) );
|
||||
mgr->SetConditions( GERBVIEW_ACTIONS::toggleXORMode, CHECK( xorModeCond ) );
|
||||
mgr->SetConditions( GERBVIEW_ACTIONS::flipGerberView, CHECK( flipGerberCond ) );
|
||||
mgr->SetConditions( ACTIONS::highContrastMode, CHECK( highContrastModeCond ) );
|
||||
|
|
|
@ -229,19 +229,11 @@ public:
|
|||
*/
|
||||
void OnSelectActiveLayer( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Called on a display mode selection.
|
||||
*
|
||||
* Mode selection can be fast display or exact mode with stacked images or with transparency.
|
||||
*/
|
||||
void OnSelectDisplayMode( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Called on request of application quit.
|
||||
*/
|
||||
void OnQuit( wxCommandEvent& event );
|
||||
|
||||
void OnUpdateDrawMode( wxUpdateUIEvent& aEvent );
|
||||
void OnUpdateSelectDCode( wxUpdateUIEvent& aEvent );
|
||||
void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ void GERBVIEW_RENDER_SETTINGS::LoadColors( const COLOR_SETTINGS* aSettings )
|
|||
{
|
||||
COLOR4D baseColor = aSettings->GetColor( i );
|
||||
|
||||
if( gvconfig()->m_Display.m_DiffMode )
|
||||
baseColor.a = 0.75;
|
||||
if( gvconfig()->m_Display.m_ForceOpacityMode )
|
||||
baseColor.a = gvconfig()->m_Display.m_OpacityModeAlphaValue;
|
||||
|
||||
m_layerColors[i] = baseColor;
|
||||
m_layerColorsHi[i] = baseColor.Brightened( 0.5 );
|
||||
|
|
|
@ -56,6 +56,9 @@ GERBVIEW_SETTINGS::GERBVIEW_SETTINGS() :
|
|||
m_params.emplace_back( new PARAM<bool>( "appearance.show_page_limit",
|
||||
&m_Display.m_DisplayPageLimits, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<double>( "appearance.mode_opacity_value",
|
||||
&m_Display.m_OpacityModeAlphaValue, 0.6 ) );
|
||||
|
||||
m_params.emplace_back( new PARAM_LIST<wxString>( "system.drill_file_history",
|
||||
&m_DrillFileHistory, {} ) );
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ void GERBVIEW_FRAME::doReCreateMenuBar()
|
|||
viewMenu->Add( GERBVIEW_ACTIONS::polygonsDisplayOutlines, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( GERBVIEW_ACTIONS::dcodeDisplay, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( GERBVIEW_ACTIONS::negativeObjectDisplay, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( GERBVIEW_ACTIONS::toggleDiffMode, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( GERBVIEW_ACTIONS::toggleForceOpacityMode, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( GERBVIEW_ACTIONS::toggleXORMode, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( ACTIONS::highContrastMode, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( GERBVIEW_ACTIONS::flipGerberView, ACTION_MENU::CHECK );
|
||||
|
|
|
@ -256,7 +256,7 @@ void GERBVIEW_FRAME::ReCreateOptToolbar()
|
|||
m_optionsToolBar->Add( GERBVIEW_ACTIONS::negativeObjectDisplay, ACTION_TOOLBAR::TOGGLE );
|
||||
m_optionsToolBar->Add( GERBVIEW_ACTIONS::dcodeDisplay, ACTION_TOOLBAR::TOGGLE );
|
||||
m_optionsToolBar->AddScaledSeparator( this );
|
||||
m_optionsToolBar->Add( GERBVIEW_ACTIONS::toggleDiffMode, ACTION_TOOLBAR::TOGGLE );
|
||||
m_optionsToolBar->Add( GERBVIEW_ACTIONS::toggleForceOpacityMode, ACTION_TOOLBAR::TOGGLE );
|
||||
m_optionsToolBar->Add( GERBVIEW_ACTIONS::toggleXORMode, ACTION_TOOLBAR::TOGGLE );
|
||||
m_optionsToolBar->Add( ACTIONS::highContrastMode, ACTION_TOOLBAR::TOGGLE );
|
||||
m_optionsToolBar->Add( GERBVIEW_ACTIONS::flipGerberView, ACTION_TOOLBAR::TOGGLE );
|
||||
|
|
|
@ -228,11 +228,11 @@ TOOL_ACTION GERBVIEW_ACTIONS::dcodeDisplay( TOOL_ACTION_ARGS()
|
|||
.Tooltip( _( "Show dcode number" ) )
|
||||
.Icon( BITMAPS::show_dcodenumber ) );
|
||||
|
||||
TOOL_ACTION GERBVIEW_ACTIONS::toggleDiffMode( TOOL_ACTION_ARGS()
|
||||
.Name( "gerbview.Control.toggleDiffMode" )
|
||||
TOOL_ACTION GERBVIEW_ACTIONS::toggleForceOpacityMode( TOOL_ACTION_ARGS()
|
||||
.Name( "gerbview.Control.toggleForceOpacityMode" )
|
||||
.Scope( AS_GLOBAL )
|
||||
.FriendlyName( _( "Show in Differential Mode" ) )
|
||||
.Tooltip( _( "Show layers in differential compare mode" ) )
|
||||
.FriendlyName( _( "Show with Forced Opacity Mode" ) )
|
||||
.Tooltip( _( "Show layers using opacity color forced mode" ) )
|
||||
.Icon( BITMAPS::gbr_select_mode1 ) );
|
||||
|
||||
TOOL_ACTION GERBVIEW_ACTIONS::toggleXORMode( TOOL_ACTION_ARGS()
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
static TOOL_ACTION polygonsDisplayOutlines;
|
||||
static TOOL_ACTION negativeObjectDisplay;
|
||||
static TOOL_ACTION dcodeDisplay;
|
||||
static TOOL_ACTION toggleDiffMode;
|
||||
static TOOL_ACTION toggleForceOpacityMode;
|
||||
static TOOL_ACTION toggleXORMode;
|
||||
static TOOL_ACTION flipGerberView;
|
||||
|
||||
|
|
|
@ -300,11 +300,11 @@ int GERBVIEW_CONTROL::DisplayControl( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
cfg->m_Display.m_HighContrastMode = !cfg->m_Display.m_HighContrastMode;
|
||||
}
|
||||
else if( aEvent.IsAction( &GERBVIEW_ACTIONS::toggleDiffMode ) )
|
||||
else if( aEvent.IsAction( &GERBVIEW_ACTIONS::toggleForceOpacityMode ) )
|
||||
{
|
||||
cfg->m_Display.m_DiffMode = !cfg->m_Display.m_DiffMode;
|
||||
cfg->m_Display.m_ForceOpacityMode = !cfg->m_Display.m_ForceOpacityMode;
|
||||
|
||||
if( cfg->m_Display.m_DiffMode && cfg->m_Display.m_XORMode )
|
||||
if( cfg->m_Display.m_ForceOpacityMode && cfg->m_Display.m_XORMode )
|
||||
cfg->m_Display.m_XORMode = false;
|
||||
|
||||
m_frame->UpdateXORLayers();
|
||||
|
@ -313,8 +313,8 @@ int GERBVIEW_CONTROL::DisplayControl( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
cfg->m_Display.m_XORMode = !cfg->m_Display.m_XORMode;
|
||||
|
||||
if( cfg->m_Display.m_XORMode && cfg->m_Display.m_DiffMode )
|
||||
cfg->m_Display.m_DiffMode = false;
|
||||
if( cfg->m_Display.m_XORMode && cfg->m_Display.m_ForceOpacityMode )
|
||||
cfg->m_Display.m_ForceOpacityMode = false;
|
||||
|
||||
m_frame->UpdateXORLayers();
|
||||
}
|
||||
|
@ -541,7 +541,7 @@ void GERBVIEW_CONTROL::setTransitions()
|
|||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::dcodeDisplay.MakeEvent() );
|
||||
Go( &GERBVIEW_CONTROL::DisplayControl, ACTIONS::highContrastMode.MakeEvent() );
|
||||
Go( &GERBVIEW_CONTROL::DisplayControl, ACTIONS::highContrastModeCycle.MakeEvent() );
|
||||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::toggleDiffMode.MakeEvent() );
|
||||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::toggleForceOpacityMode.MakeEvent() );
|
||||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::toggleXORMode.MakeEvent() );
|
||||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::flipGerberView.MakeEvent() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue