From 3e947553f5d75e34c0f9a2594c4bafa32848b998 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 12 Mar 2021 22:45:32 +0000 Subject: [PATCH] Adjust pin conflicts table for wxWidgets 3.1. --- eeschema/dialogs/panel_setup_pinmap.cpp | 17 +++++++++++------ eeschema/dialogs/panel_setup_pinmap_base.cpp | 2 +- eeschema/dialogs/panel_setup_pinmap_base.fbp | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/eeschema/dialogs/panel_setup_pinmap.cpp b/eeschema/dialogs/panel_setup_pinmap.cpp index 48ba4fee06..480da55caf 100644 --- a/eeschema/dialogs/panel_setup_pinmap.cpp +++ b/eeschema/dialogs/panel_setup_pinmap.cpp @@ -80,6 +80,11 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel() wxPoint pos( 0, charSize.y * 2 ); wxStaticText* text; +#ifdef __WXMAC__ + bmapSize.y += 2; + charSize.y += 2; +#endif + if( !m_initialized ) { std::vector labels; @@ -107,7 +112,9 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel() pos.x += 5; } else + { pos = m_buttonList[0][0]->GetPosition(); + } for( int ii = 0; ii < ELECTRICAL_PINTYPES_TOTAL; ii++ ) { @@ -118,15 +125,15 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel() // Add column labels (only once) PIN_ERROR diag = m_schematic->ErcSettings().GetPinMapValue( ii, jj ); - int x = pos.x + ( jj * ( bmapSize.x + 4 ) ); + int x = pos.x + ( jj * ( bmapSize.x + 2 ) ); if( ( ii == jj ) && !m_initialized ) { - wxPoint textPos( x + KiROUND( bmapSize.x / 2 ) - KiROUND( charSize.x / 2 ), + wxPoint textPos( x + KiROUND( bmapSize.x / 2 ) - KiROUND( charSize.x ), y - charSize.y * 2 ); new wxStaticText( m_matrixPanel, wxID_ANY, CommentERC_V[ii], textPos ); - wxPoint calloutPos( x + KiROUND( bmapSize.x / 2 ) - 2, + wxPoint calloutPos( x + KiROUND( bmapSize.x / 2 ) - KiROUND( charSize.x / 2 ), y - charSize.y ); new wxStaticText( m_matrixPanel, wxID_ANY, "|", calloutPos ); } @@ -138,10 +145,8 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel() wxBitmapButton* btn = new wxBitmapButton( m_matrixPanel, event_id, KiBitmap( bitmap_butt ), wxPoint( x, y ) ); - // On the mac, the button sizes are reliably 4 pixels smaller (maybe due to corner rounding) - // than can be displayed by the bitmap #ifdef __WXMAC__ - btn->SetSize( btn->GetSize().x + 8, btn->GetSize().y + 4 ); + btn->SetSize( btn->GetSize().x - 1, btn->GetSize().y ); #else btn->SetSize( btn->GetSize().x + 4, btn->GetSize().y ); #endif diff --git a/eeschema/dialogs/panel_setup_pinmap_base.cpp b/eeschema/dialogs/panel_setup_pinmap_base.cpp index 8a74e9e937..c3382d60a9 100644 --- a/eeschema/dialogs/panel_setup_pinmap_base.cpp +++ b/eeschema/dialogs/panel_setup_pinmap_base.cpp @@ -21,7 +21,7 @@ PANEL_SETUP_PINMAP_BASE::PANEL_SETUP_PINMAP_BASE( wxWindow* parent, wxWindowID i sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pin to Pin Connections") ), wxVERTICAL ); m_matrixPanel = new wxPanel( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_matrixPanel->SetMinSize( wxSize( 500,420 ) ); + m_matrixPanel->SetMinSize( wxSize( 500,444 ) ); sbSizer3->Add( m_matrixPanel, 1, wxEXPAND | wxALL, 5 ); diff --git a/eeschema/dialogs/panel_setup_pinmap_base.fbp b/eeschema/dialogs/panel_setup_pinmap_base.fbp index 65b83200c0..58fa670966 100644 --- a/eeschema/dialogs/panel_setup_pinmap_base.fbp +++ b/eeschema/dialogs/panel_setup_pinmap_base.fbp @@ -112,7 +112,7 @@ 0 - 500,420 + 500,444 1 m_matrixPanel 1