Pcbnew: layer stack up dialog layout fixes.

This commit is contained in:
Wayne Stambaugh 2020-11-11 12:02:11 -05:00
parent 5841ea3cd2
commit 7a7719bf97
7 changed files with 34 additions and 20 deletions

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version v3.8.0)
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -93,6 +93,7 @@ DIALOG_DIELECTRIC_MATERIAL_BASE::DIALOG_DIELECTRIC_MATERIAL_BASE( wxWindow* pare
this->SetSizer( bSizerMain );
this->Layout();
bSizerMain->Fit( this );
this->Centre( wxBOTH );

View File

@ -14,6 +14,7 @@
<property name="file">dialog_dielectric_list_manager_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">DialogDielectricListManager</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -45,7 +47,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_DIELECTRIC_MATERIAL_BASE</property>
<property name="pos"></property>
<property name="size">581,353</property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
<property name="title">Dielectric Materials</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version v3.8.0)
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -55,7 +55,7 @@ class DIALOG_DIELECTRIC_MATERIAL_BASE : public DIALOG_SHIM
public:
DIALOG_DIELECTRIC_MATERIAL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Dielectric Materials"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 581,353 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_DIELECTRIC_MATERIAL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Dielectric Materials"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DIELECTRIC_MATERIAL_BASE();
};

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2019-2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -182,7 +182,8 @@ void PANEL_SETUP_BOARD_STACKUP::onAddDielectricLayer( wxCommandEvent& event )
}
// Show list
int index = wxGetSingleChoiceIndex( wxEmptyString, _("Dielectric Layers List"),
int index = wxGetSingleChoiceIndex( _( "Select dielectric layer to add to board stack up." ),
_("Dielectric Layers List"),
d_list);
if( index < 0 )
@ -231,7 +232,8 @@ void PANEL_SETUP_BOARD_STACKUP::onRemoveDielectricLayer( wxCommandEvent& event )
}
// Show choice list
int index = wxGetSingleChoiceIndex( wxEmptyString, _("Dielectric Layers List"),
int index = wxGetSingleChoiceIndex( _( "Select dielectric layer to remove from board stack up." ),
_( "Dielectric Layers" ),
d_list );
if( index < 0 )
@ -539,8 +541,8 @@ void PANEL_SETUP_BOARD_STACKUP::addMaterialChooser( wxWindowID aId,
bSizerMat->Add( m_buttonMat, 0, wxALIGN_CENTER_VERTICAL, 2 );
m_buttonMat->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP::onMaterialChange ),
NULL, this );
wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP::onMaterialChange ),
NULL, this );
m_controlItemsList.push_back( m_buttonMat );
aUiRowItem.m_MaterialCtrl = textCtrl;
@ -807,7 +809,7 @@ void PANEL_SETUP_BOARD_STACKUP::buildLayerStackPanel( bool aCreatedInitialStacku
if( aCreatedInitialStackup )
{
// Creates a full BOARD_STACKUP with 32 copper layers.
// extra layers will be hiden later.
// extra layers will be hidden later.
// but if the number of layer is changed in the dialog, the corresponding
// widgets will be available with their previous values.
m_stackup.BuildDefaultStackupList( nullptr, m_brdSettings->GetCopperLayerCount() );
@ -869,7 +871,6 @@ void PANEL_SETUP_BOARD_STACKUP::buildLayerStackPanel( bool aCreatedInitialStacku
}
// Transfer current UI settings to m_stackup but not to the board
bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup()
{
@ -950,8 +951,10 @@ bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup()
else
{
success = false;
if( !error_msg.IsEmpty() )
error_msg << "\n";
error_msg << _( "Incorrect value for Loss tg (Loss tg must be positive or null if not used)" );
}
}
@ -1205,7 +1208,7 @@ void PANEL_SETUP_BOARD_STACKUP::onCalculateDielectricThickness( wxCommandEvent&
return;
}
// the number of adjustable dielectric layers must obvioulsly be > 0
// the number of adjustable dielectric layers must obviously be > 0
// So verify the user has at least one dielectric layer free
int adjustableDielectricCount = dielectricCount - fixed_thickness_cnt;
@ -1241,7 +1244,8 @@ void PANEL_SETUP_BOARD_STACKUP::onCalculateDielectricThickness( wxCommandEvent&
{
item->SetThickness( dielectric_thickness, sublayer_idx );
wxTextCtrl* textCtrl = static_cast<wxTextCtrl*>( ui_item.m_ThicknessCtrl );
textCtrl->SetValue( StringFromValue( m_units, item->GetThickness( sublayer_idx ) ) );
textCtrl->SetValue( StringFromValue( m_units,
item->GetThickness( sublayer_idx ) ) );
}
}
}
@ -1443,7 +1447,7 @@ void PANEL_SETUP_BOARD_STACKUP::updateIconColor( int aRow )
{
wxStaticBitmap* st_bitmap = m_rowUiItemsList[aRow].m_Icon;
// explicit depth important under MSW
wxBitmap bmp(m_colorIconsSize.x, m_colorIconsSize.y / 2, 24);
wxBitmap bmp( m_colorIconsSize.x, m_colorIconsSize.y / 2, 24 );
drawBitmap( bmp, getColorIconItem( aRow ) );
st_bitmap->SetBitmap( bmp );
return;
@ -1520,7 +1524,7 @@ wxBitmapComboBox* PANEL_SETUP_BOARD_STACKUP::createBmComboBox( BOARD_STACKUP_ITE
void drawBitmap( wxBitmap& aBitmap, wxColor aColor )
{
wxNativePixelData data( aBitmap );
wxNativePixelData::Iterator p(data);
wxNativePixelData::Iterator p( data );
for( int yy = 0; yy < data.GetHeight(); yy++ )
{

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -187,6 +187,7 @@ PANEL_SETUP_BOARD_STACKUP_BASE::PANEL_SETUP_BOARD_STACKUP_BASE( wxWindow* parent
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
// Connect Events
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::OnUpdateUI ) );

View File

@ -14,6 +14,7 @@
<property name="file">panel_board_stackup_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">PANEL_BOARD_SETUP_BASE</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Panel" expanded="1">
@ -43,7 +45,7 @@
<property name="minimum_size"></property>
<property name="name">PANEL_SETUP_BOARD_STACKUP_BASE</property>
<property name="pos"></property>
<property name="size">670,420</property>
<property name="size">-1,-1</property>
<property name="subclass">; ; forward_declare</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
@ -348,6 +350,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1194,6 +1197,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1267,6 +1271,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1801,6 +1806,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -17,10 +17,10 @@
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/statbmp.h>
@ -84,7 +84,7 @@ class PANEL_SETUP_BOARD_STACKUP_BASE : public wxPanel
public:
PANEL_SETUP_BOARD_STACKUP_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 670,420 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
PANEL_SETUP_BOARD_STACKUP_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_SETUP_BOARD_STACKUP_BASE();
};