Commit 323a7000 authored by dickelbeck's avatar dickelbeck
Browse files

SMD pads in high-contrast mode refinements

parent b8a449e0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -5,6 +5,17 @@ Please add newer entries at the top, list the date and your name with
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>
================================================================================
+ pcbnew
+23 −5
Original line number Diff line number Diff line
@@ -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( m_Attribut==SMD && DisplayOpt.ContrastModeDisplay )
    {
        // when editing tracks show SMD components on either of the routing 
        // layers as normal, not greyed out.
        // when routing tracks 
        if( frame->m_ID_current_state == ID_TRACK_BUTT )
        {
            if( !IsOnLayer( screen->m_Active_Layer )  
             && !IsOnLayer( screen->m_Route_Layer_TOP) 
             && !IsOnLayer( screen->m_Route_Layer_BOTTOM) ) 
            int routeTop = screen->m_Route_Layer_TOP;
            int routeBot = 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 |= DARKDARKGRAY;
+10 −6
Original line number Diff line number Diff line
@@ -259,25 +259,28 @@ void WinEDA_PcbGeneralOptionsFrame::CreateControls()
    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);

    wxString m_PolarDisplayStrings[] = {
    static const wxString m_PolarDisplayStrings[] = {
        _("No Display"),
        _("Display")
    };
    
    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);

    wxString m_BoxUnitsStrings[] = {
    static const wxString m_BoxUnitsStrings[] = {
        _("Inches"),
        _("millimeters")
    };
    
    m_BoxUnits = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Units"), wxDefaultPosition, 
                                    wxDefaultSize, 2, m_BoxUnitsStrings, 1,wxRA_SPECIFY_COLS );
    itemBoxSizer3->Add(m_BoxUnits, 0, wxALIGN_LEFT|wxALL, 5);

    wxString m_CursorShapeStrings[] = {
    static const wxString m_CursorShapeStrings[] = {
        _("Small"),
        _("Big")
    };
    
    m_CursorShape = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("Cursor"), wxDefaultPosition, wxDefaultSize, 2,
                        m_CursorShapeStrings, 1, wxRA_SPECIFY_COLS );
    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));
    itemStaticBoxSizer15->Add(m_Track_DoubleSegm_Ctrl, 0, wxALIGN_LEFT|wxALL, 5);

    wxString m_MagneticPadOptCtrlStrings[] = {
    static const wxString m_MagneticPadOptCtrlStrings[] = {
        _("Never"),
        _("When creating tracks"),
        _("Always")
    };
    
    m_MagneticPadOptCtrl = new wxRadioBox( itemDialog1, ID_MAGNETIC_PAD_CTRL, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, 3, m_MagneticPadOptCtrlStrings, 1, wxRA_SPECIFY_COLS );
    if (ShowToolTips())
        m_MagneticPadOptCtrl->SetToolTip(_("control the capture of the pcb cursor when the mouse cursor enters a pad area"));
+4 −2
Original line number Diff line number Diff line
@@ -151,6 +151,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
        {
            DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
        }
        
        if( m_ID_current_state != id )
            SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
        break;
    }
@@ -286,7 +288,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
        break;

    case ID_PCB_COTATION_BUTT:
        SetToolID( id, wxCURSOR_PENCIL, _( "Add Cotation" ) );
        SetToolID( id, wxCURSOR_PENCIL, _( "Add Dimension" ) );
        break;

    case ID_NO_SELECT_BUTT:
+8 −1
Original line number Diff line number Diff line
@@ -244,10 +244,17 @@ void WinEDA_BasePcbFrame::SelectLayerPair()
    WinEDA_SelLayerPairFrame* frame =
        new WinEDA_SelLayerPairFrame( this );

    frame->ShowModal();
    int result = frame->ShowModal();
    frame->Destroy();
    DrawPanel->MouseToCursorSchema();
    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();
    }
}


Loading