SMD pads in high-contrast mode refinements
This commit is contained in:
parent
b8a449e015
commit
323a70009a
|
@ -5,6 +5,17 @@ Please add newer entries at the top, list the date and your name with
|
||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
|
||||||
|
2007-Oct-11 UPDATE Dick Hollenbeck <dick@softplc.com>
|
||||||
|
================================================================================
|
||||||
|
+ pcbnew
|
||||||
|
* D_PAD::Draw() refinements.
|
||||||
|
* WinEDA_DrawFrame::SetToolID() will redraw the DrawPanel if the track
|
||||||
|
button is selected or de-selected and the high-contrast mode is in play.
|
||||||
|
* If high-contrast mode is in play, the Select Layer Pair dialog completion
|
||||||
|
will redraw the DisplayPanel, now that SMD pads' colors are so dependent
|
||||||
|
on these variables.
|
||||||
|
|
||||||
|
|
||||||
2007-Oct-11 UPDATE Dick Hollenbeck <dick@softplc.com>
|
2007-Oct-11 UPDATE Dick Hollenbeck <dick@softplc.com>
|
||||||
================================================================================
|
================================================================================
|
||||||
+ pcbnew
|
+ pcbnew
|
||||||
|
|
|
@ -333,13 +333,31 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
|
||||||
// if SMD pad and high contrast mode
|
// if SMD pad and high contrast mode
|
||||||
if( m_Attribut==SMD && DisplayOpt.ContrastModeDisplay )
|
if( m_Attribut==SMD && DisplayOpt.ContrastModeDisplay )
|
||||||
{
|
{
|
||||||
// when editing tracks show SMD components on either of the routing
|
// when routing tracks
|
||||||
// layers as normal, not greyed out.
|
|
||||||
if( frame->m_ID_current_state == ID_TRACK_BUTT )
|
if( frame->m_ID_current_state == ID_TRACK_BUTT )
|
||||||
{
|
{
|
||||||
if( !IsOnLayer( screen->m_Active_Layer )
|
int routeTop = screen->m_Route_Layer_TOP;
|
||||||
&& !IsOnLayer( screen->m_Route_Layer_TOP)
|
int routeBot = screen->m_Route_Layer_BOTTOM;
|
||||||
&& !IsOnLayer( screen->m_Route_Layer_BOTTOM) )
|
|
||||||
|
// if routing between copper and component layers,
|
||||||
|
// or the current layer is one of said 2 external copper layers,
|
||||||
|
// then highlight only the current layer.
|
||||||
|
if( ((1<<routeTop) | (1<<routeBot)) == (CUIVRE_LAYER | CMP_LAYER)
|
||||||
|
|| ((1<<screen->m_Active_Layer) & (CUIVRE_LAYER | CMP_LAYER)) )
|
||||||
|
{
|
||||||
|
if( !IsOnLayer( screen->m_Active_Layer ) )
|
||||||
|
{
|
||||||
|
color &= ~MASKCOLOR;
|
||||||
|
color |= DARKDARKGRAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// else routing between an internal signal layer and some other layer.
|
||||||
|
// grey out all SMD pads not on current or the single selected
|
||||||
|
// external layer.
|
||||||
|
else if( !IsOnLayer( screen->m_Active_Layer )
|
||||||
|
&& !IsOnLayer( routeTop )
|
||||||
|
&& !IsOnLayer( routeBot ) )
|
||||||
{
|
{
|
||||||
color &= ~MASKCOLOR;
|
color &= ~MASKCOLOR;
|
||||||
color |= DARKDARKGRAY;
|
color |= DARKDARKGRAY;
|
||||||
|
|
|
@ -259,25 +259,28 @@ void WinEDA_PcbGeneralOptionsFrame::CreateControls()
|
||||||
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
|
||||||
itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);
|
itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
wxString m_PolarDisplayStrings[] = {
|
static const wxString m_PolarDisplayStrings[] = {
|
||||||
_("No Display"),
|
_("No Display"),
|
||||||
_("Display")
|
_("Display")
|
||||||
};
|
};
|
||||||
|
|
||||||
m_PolarDisplay = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("Display Polar Coord"), wxDefaultPosition, wxDefaultSize, 2, m_PolarDisplayStrings, 1, wxRA_SPECIFY_COLS );
|
m_PolarDisplay = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("Display Polar Coord"), wxDefaultPosition, wxDefaultSize, 2, m_PolarDisplayStrings, 1, wxRA_SPECIFY_COLS );
|
||||||
itemBoxSizer3->Add(m_PolarDisplay, 0, wxALIGN_LEFT|wxALL, 5);
|
itemBoxSizer3->Add(m_PolarDisplay, 0, wxALIGN_LEFT|wxALL, 5);
|
||||||
|
|
||||||
wxString m_BoxUnitsStrings[] = {
|
static const wxString m_BoxUnitsStrings[] = {
|
||||||
_("Inches"),
|
_("Inches"),
|
||||||
_("millimeters")
|
_("millimeters")
|
||||||
};
|
};
|
||||||
|
|
||||||
m_BoxUnits = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Units"), wxDefaultPosition,
|
m_BoxUnits = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Units"), wxDefaultPosition,
|
||||||
wxDefaultSize, 2, m_BoxUnitsStrings, 1,wxRA_SPECIFY_COLS );
|
wxDefaultSize, 2, m_BoxUnitsStrings, 1,wxRA_SPECIFY_COLS );
|
||||||
itemBoxSizer3->Add(m_BoxUnits, 0, wxALIGN_LEFT|wxALL, 5);
|
itemBoxSizer3->Add(m_BoxUnits, 0, wxALIGN_LEFT|wxALL, 5);
|
||||||
|
|
||||||
wxString m_CursorShapeStrings[] = {
|
static const wxString m_CursorShapeStrings[] = {
|
||||||
_("Small"),
|
_("Small"),
|
||||||
_("Big")
|
_("Big")
|
||||||
};
|
};
|
||||||
|
|
||||||
m_CursorShape = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("Cursor"), wxDefaultPosition, wxDefaultSize, 2,
|
m_CursorShape = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("Cursor"), wxDefaultPosition, wxDefaultSize, 2,
|
||||||
m_CursorShapeStrings, 1, wxRA_SPECIFY_COLS );
|
m_CursorShapeStrings, 1, wxRA_SPECIFY_COLS );
|
||||||
itemBoxSizer3->Add(m_CursorShape, 0, wxALIGN_LEFT|wxALL, 5);
|
itemBoxSizer3->Add(m_CursorShape, 0, wxALIGN_LEFT|wxALL, 5);
|
||||||
|
@ -348,11 +351,12 @@ void WinEDA_PcbGeneralOptionsFrame::CreateControls()
|
||||||
m_Track_DoubleSegm_Ctrl->SetForegroundColour(wxColour(0, 144, 0));
|
m_Track_DoubleSegm_Ctrl->SetForegroundColour(wxColour(0, 144, 0));
|
||||||
itemStaticBoxSizer15->Add(m_Track_DoubleSegm_Ctrl, 0, wxALIGN_LEFT|wxALL, 5);
|
itemStaticBoxSizer15->Add(m_Track_DoubleSegm_Ctrl, 0, wxALIGN_LEFT|wxALL, 5);
|
||||||
|
|
||||||
wxString m_MagneticPadOptCtrlStrings[] = {
|
static const wxString m_MagneticPadOptCtrlStrings[] = {
|
||||||
_("Never"),
|
_("Never"),
|
||||||
_("When creating tracks"),
|
_("When creating tracks"),
|
||||||
_("Always")
|
_("Always")
|
||||||
};
|
};
|
||||||
|
|
||||||
m_MagneticPadOptCtrl = new wxRadioBox( itemDialog1, ID_MAGNETIC_PAD_CTRL, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, 3, m_MagneticPadOptCtrlStrings, 1, wxRA_SPECIFY_COLS );
|
m_MagneticPadOptCtrl = new wxRadioBox( itemDialog1, ID_MAGNETIC_PAD_CTRL, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, 3, m_MagneticPadOptCtrlStrings, 1, wxRA_SPECIFY_COLS );
|
||||||
if (ShowToolTips())
|
if (ShowToolTips())
|
||||||
m_MagneticPadOptCtrl->SetToolTip(_("control the capture of the pcb cursor when the mouse cursor enters a pad area"));
|
m_MagneticPadOptCtrl->SetToolTip(_("control the capture of the pcb cursor when the mouse cursor enters a pad area"));
|
||||||
|
|
|
@ -151,6 +151,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
|
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( m_ID_current_state != id )
|
||||||
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
|
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -286,7 +288,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_PCB_COTATION_BUTT:
|
case ID_PCB_COTATION_BUTT:
|
||||||
SetToolID( id, wxCURSOR_PENCIL, _( "Add Cotation" ) );
|
SetToolID( id, wxCURSOR_PENCIL, _( "Add Dimension" ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_NO_SELECT_BUTT:
|
case ID_NO_SELECT_BUTT:
|
||||||
|
|
|
@ -244,10 +244,17 @@ void WinEDA_BasePcbFrame::SelectLayerPair()
|
||||||
WinEDA_SelLayerPairFrame* frame =
|
WinEDA_SelLayerPairFrame* frame =
|
||||||
new WinEDA_SelLayerPairFrame( this );
|
new WinEDA_SelLayerPairFrame( this );
|
||||||
|
|
||||||
frame->ShowModal();
|
int result = frame->ShowModal();
|
||||||
frame->Destroy();
|
frame->Destroy();
|
||||||
DrawPanel->MouseToCursorSchema();
|
DrawPanel->MouseToCursorSchema();
|
||||||
SetToolbars();
|
SetToolbars();
|
||||||
|
|
||||||
|
// if user changed colors and we are in high contrast mode, then redraw
|
||||||
|
// because the SMD pads may change color.
|
||||||
|
if( result >= 0 && DisplayOpt.ContrastModeDisplay )
|
||||||
|
{
|
||||||
|
ReDrawPanel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -504,11 +504,22 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
|
||||||
if( id < 0 )
|
if( id < 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef PCBNEW
|
||||||
|
// handle color changes for transitions in and out of ID_TRACK_BUTT
|
||||||
|
if( (m_ID_current_state==ID_TRACK_BUTT && id!=ID_TRACK_BUTT)
|
||||||
|
|| (m_ID_current_state!=ID_TRACK_BUTT && id==ID_TRACK_BUTT) )
|
||||||
|
{
|
||||||
|
if( DisplayOpt.ContrastModeDisplay )
|
||||||
|
ReDrawPanel();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Old Tool Inactif ou ID_NO_SELECT_BUTT actif si pas de nouveau Tool
|
// Old Tool Inactif ou ID_NO_SELECT_BUTT actif si pas de nouveau Tool
|
||||||
if( m_ID_current_state )
|
if( m_ID_current_state )
|
||||||
{
|
{
|
||||||
if( m_VToolBar )
|
if( m_VToolBar )
|
||||||
m_VToolBar->ToggleTool( m_ID_current_state, FALSE );
|
m_VToolBar->ToggleTool( m_ID_current_state, FALSE );
|
||||||
|
|
||||||
if( m_AuxVToolBar )
|
if( m_AuxVToolBar )
|
||||||
m_AuxVToolBar->ToggleTool( m_ID_current_state, FALSE );
|
m_AuxVToolBar->ToggleTool( m_ID_current_state, FALSE );
|
||||||
}
|
}
|
||||||
|
@ -518,6 +529,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
|
||||||
{
|
{
|
||||||
if( m_VToolBar )
|
if( m_VToolBar )
|
||||||
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE );
|
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE );
|
||||||
|
|
||||||
if( m_AuxVToolBar )
|
if( m_AuxVToolBar )
|
||||||
m_AuxVToolBar->ToggleTool( m_ID_current_state, FALSE );
|
m_AuxVToolBar->ToggleTool( m_ID_current_state, FALSE );
|
||||||
}
|
}
|
||||||
|
@ -530,6 +542,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
|
||||||
{
|
{
|
||||||
if( m_VToolBar )
|
if( m_VToolBar )
|
||||||
m_VToolBar->ToggleTool( id, TRUE );
|
m_VToolBar->ToggleTool( id, TRUE );
|
||||||
|
|
||||||
if( m_AuxVToolBar )
|
if( m_AuxVToolBar )
|
||||||
m_AuxVToolBar->ToggleTool( id, TRUE );
|
m_AuxVToolBar->ToggleTool( id, TRUE );
|
||||||
}
|
}
|
||||||
|
|
|
@ -951,7 +951,6 @@ void WinEDA_DrawPanel::OnMouseEvent( wxMouseEvent& event )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( event.ButtonUp( 1 ) || event.ButtonUp( 2 ) )
|
if( event.ButtonUp( 1 ) || event.ButtonUp( 2 ) )
|
||||||
{
|
{
|
||||||
/* Relachement du bouton: fin de delimitation de block.
|
/* Relachement du bouton: fin de delimitation de block.
|
||||||
|
|
9
todo.txt
9
todo.txt
|
@ -63,4 +63,13 @@ as zoom changes, the effective real size of the MARKER changes.
|
||||||
@todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
|
@todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
|
||||||
|
|
||||||
|
|
||||||
|
*** Establish consistent policy on UI text upper vs. lower case usage. My
|
||||||
|
suggestions are below, but the important thing is consistency, not the actual
|
||||||
|
choices.
|
||||||
|
Window Titles: all nouns and verbs capitalized.
|
||||||
|
Tooltips: all words lower case except first word. (This is a sentence fragment, not a title).
|
||||||
|
others (what are they?):
|
||||||
|
:
|
||||||
|
:
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue