Commit 8e0937e6 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Pcbnew: code cleaning, dialogs converted from Dialogblocks to wxFormBuilder,...

Pcbnew: code cleaning, dialogs converted from Dialogblocks to wxFormBuilder, file housekeeping. Add patch from Manveru.
parents 6963001a 8a0b632a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -605,7 +605,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawText( TEXTE_PCB* text )

    SetGLColor( color );
    s_Text3DZPos  = g_Parm_3D_Visu.m_LayerZcoord[layer];
    s_Text3DWidth = text->m_Width * g_Parm_3D_Visu.m_BoardScale;
    s_Text3DWidth = text->m_Thickness * g_Parm_3D_Visu.m_BoardScale;
    glNormal3f( 0.0, 0.0, Get3DLayerSide( layer ) );
    wxSize size = text->m_Size;
    if( text->m_Mirror )
@@ -625,7 +625,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawText( TEXTE_PCB* text )
            DrawGraphicText( NULL, NULL, pos, (EDA_Colors) color,
                             txt, text->m_Orient, size,
                             text->m_HJustify, text->m_VJustify,
                             text->m_Width, text->m_Italic,
                             text->m_Thickness, text->m_Italic,
                             true, Draw3dTextSegm );
            pos += offset;
        }
@@ -636,7 +636,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawText( TEXTE_PCB* text )
        DrawGraphicText( NULL, NULL, text->m_Pos, (EDA_Colors) color,
                         text->m_Text, text->m_Orient, size,
                         text->m_HJustify, text->m_VJustify,
                         text->m_Width, text->m_Italic,
                         text->m_Thickness, text->m_Italic,
                         true,
                         Draw3dTextSegm );
}
+5 −5
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ EDA_TextStruct::EDA_TextStruct( const wxString& text )
    m_Mirror    = false;                            // display mirror if true
    m_HJustify  = GR_TEXT_HJUSTIFY_CENTER;
    m_VJustify  = GR_TEXT_VJUSTIFY_CENTER;          /* Justifications Horiz et Vert du texte */
    m_Width     = 0;                                /* thickness */
    m_Thickness     = 0;                                /* thickness */
    m_Italic    = false;                            /* true = italic shape */
    m_Bold      = false;
    m_MultilineAllowed = false;                     // Set to true only for texts that can use multiline.
@@ -203,7 +203,7 @@ EDA_TextStruct::~EDA_TextStruct()
 */
int EDA_TextStruct::LenSize( const wxString& aLine ) const
{
    return ReturnGraphicTextWidth(aLine, m_Size.x, m_Italic, m_Bold ) + m_Width;
    return ReturnGraphicTextWidth(aLine, m_Size.x, m_Italic, m_Bold ) + m_Thickness;
}


@@ -262,7 +262,7 @@ EDA_Rect EDA_TextStruct::GetTextBox( int aLine )
    delete list;

    rect.SetSize( textsize );
    rect.Inflate( m_Width/2 );      // ensure a small margin
    rect.Inflate( m_Thickness/2 );      // ensure a small margin

    /* Now, calculate the rect origin, according to text justification
     * At this point the rectangle origin is the text origin (m_Pos).
@@ -284,7 +284,7 @@ EDA_Rect EDA_TextStruct::GetTextBox( int aLine )
        break;
    }

    dy = m_Size.y + m_Width;
    dy = m_Size.y + m_Thickness;
    switch( m_VJustify )
    {
    case GR_TEXT_VJUSTIFY_TOP:
@@ -419,7 +419,7 @@ void EDA_TextStruct::DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
                                        GRTraceMode aFillMode, EDA_Colors aAnchor_color,
                                        wxString& aText, wxPoint aPos )
{
    int width = m_Width;
    int width = m_Thickness;

    if( aFillMode == FILAIRE )
        width = 0;
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
#include "colors_selection.h"

#include "bitmaps.h"
#include "pcbnew_id.h"

#include "hotkeys.h"
#include "help_common_strings.h"
+2 −2
Original line number Diff line number Diff line
@@ -224,12 +224,12 @@ void DialogLabelEditor::TextPropertiesAccept( wxCommandEvent& aEvent )
    if( ( style & 2 ) )
    {
        m_CurrentText->m_Bold  = true;
        m_CurrentText->m_Width = GetPenSizeForBold( m_CurrentText->m_Size.x );
        m_CurrentText->m_Thickness = GetPenSizeForBold( m_CurrentText->m_Size.x );
    }
    else
    {
        m_CurrentText->m_Bold  = false;
        m_CurrentText->m_Width = 0;
        m_CurrentText->m_Thickness = 0;
    }

    m_Parent->OnModify();
+402 −402

File changed.

Preview size limit exceeded, changes collapsed.

Loading