Fix a few issues with library start wizard

- Improve text layout / responsiveness
- Fix missing stock tables warning not showing up in the right cases

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22923
This commit is contained in:
Jon Evans
2026-03-10 08:48:04 -04:00
parent 10592c242d
commit 270a6830b0
6 changed files with 44 additions and 9 deletions
@@ -18,7 +18,7 @@ PANEL_STARTWIZARD_LIBRARIES_BASE::PANEL_STARTWIZARD_LIBRARIES_BASE( wxWindow* pa
bSizer8 = new wxBoxSizer( wxVERTICAL );
m_stIntro = new wxStaticText( this, wxID_ANY, _("KiCad comes with a large set of symbol and footprint libraries maintained by the KiCad librarian team. You may also create your own libraries, and install third-party ones from the Plugin and Content Manager or other sources.\n\nLibrary tables are the configuration files which list the libraries to be loaded. Global libraries are available in every project, and you may also add project-specific libraries if desired."), wxDefaultPosition, wxDefaultSize, 0 );
m_stIntro->Wrap( 540 );
m_stIntro->Wrap( -1 );
bSizer8->Add( m_stIntro, 0, wxALL|wxEXPAND, 5 );
m_stRequiredTablesLabel = new wxStaticText( this, wxID_ANY, _("<b>The following global library tables need to be created:</b>"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -61,7 +61,7 @@ PANEL_STARTWIZARD_LIBRARIES_BASE::PANEL_STARTWIZARD_LIBRARIES_BASE( wxWindow* pa
m_sizerWarning->Add( m_bmpWarning, 0, wxALL, 4 );
m_stWarning = new wxStaticText( this, wxID_ANY, _("The built-in library tables could not be found in the expected location. This usually means that you have installed the KiCad software without also installing the libraries. You can proceed with setup, but you will need to install the libraries separately in order for them to be available."), wxDefaultPosition, wxDefaultSize, 0 );
m_stWarning->Wrap( 540 );
m_stWarning->Wrap( -1 );
m_sizerWarning->Add( m_stWarning, 0, wxALL, 5 );
@@ -73,8 +73,15 @@ PANEL_STARTWIZARD_LIBRARIES_BASE::PANEL_STARTWIZARD_LIBRARIES_BASE( wxWindow* pa
this->SetSizer( bPanelSizer );
this->Layout();
bPanelSizer->Fit( this );
// Connect Events
this->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_STARTWIZARD_LIBRARIES_BASE::OnSize ) );
}
PANEL_STARTWIZARD_LIBRARIES_BASE::~PANEL_STARTWIZARD_LIBRARIES_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_STARTWIZARD_LIBRARIES_BASE::OnSize ) );
}