From eebc4ff21f5d9ad48aebe51b3bd2995f31ced5b5 Mon Sep 17 00:00:00 2001 From: jerryjacobs Date: Wed, 17 Jun 2009 17:08:39 +0000 Subject: [PATCH] Applied Hauptmech patch, highlight only current layer in high-contrast mode - tracker patch 2807379 --- common/about_kicad.cpp | 1 + pcbnew/class_pad_draw_functions.cpp | 3 +++ pcbnew/class_track.cpp | 3 +++ 3 files changed, 7 insertions(+) diff --git a/common/about_kicad.cpp b/common/about_kicad.cpp index b852f13066..aaf99a81df 100644 --- a/common/about_kicad.cpp +++ b/common/about_kicad.cpp @@ -129,6 +129,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info ) /* Add developers */ info.AddDeveloper( wxT( "Jean-Pierre Charras " ) ); info.AddDeveloper( SetMsg( wxT( "Dick Hollenbeck " ) ) ); + info.AddDeveloper( SetMsg( wxT( "Hauptmech ") ) ); info.AddDeveloper( SetMsg( wxT( "Jerry Jacobs " ) ) ); info.AddDeveloper( SetMsg( wxT( "Jonas Diemer " ) ) ); info.AddDeveloper( SetMsg( wxT( "KBool Library " ) ) ); diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index babea24c3a..ffcfd190ef 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -481,6 +481,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin if( screen->Scale( tsize ) >= CHAR_SIZE_MIN ) // Not drawable in size too small. { + if( !(!IsOnLayer( screen->m_Active_Layer )&& DisplayOpt.ContrastModeDisplay)){ + tpos = tpos0; if ( display_padnum ) tpos.y += AreaSize.y / 2; @@ -491,5 +493,6 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin WHITE, m_ShortNetname, t_angle, wxSize( tsize, tsize ), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7, false, false ); + } } } diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index d7ae1127fc..96586b7903 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -684,11 +684,14 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin angle = 900; // angle is in 0.1 degree if( panel->GetScreen()->Scale( tsize ) >= 6 ) { + if( !(!IsOnLayer( curr_layer )&& DisplayOpt.ContrastModeDisplay)){ + tsize = (tsize * 8) / 10; // small reduction to give a better look DrawGraphicText( panel, DC, tpos, WHITE, net->GetShortNetname(), angle, wxSize( tsize, tsize ), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7, false, false ); + } } } }