Add spacing for Mac file dialog custom controls.

This commit is contained in:
Jeff Young 2025-08-19 12:52:21 +01:00
parent ddcd1ade28
commit e841ca1906
9 changed files with 50 additions and 7 deletions

View File

@ -29,6 +29,10 @@ public:
virtual void AddCustomControls( wxFileDialogCustomize& customizer ) override
{
#ifdef __WXMAC__
customizer.AddStaticText( wxT( "\n\n" ) );
#endif
m_cb = customizer.AddCheckBox( _( "Create a new project for this schematic" ) );
m_cb->SetValue( true );

View File

@ -173,6 +173,10 @@ void FILEDLG_IMPORT_SHEET_CONTENTS::TransferDataFromCustomControls()
void FILEDLG_IMPORT_SHEET_CONTENTS::AddCustomControls( wxFileDialogCustomize& customizer )
{
#ifdef __WXMAC__
customizer.AddStaticText( wxT( "\n\n" ) ); // Increase height of static box
#endif
m_cbRepeatedPlacement = customizer.AddCheckBox( REPEATED_PLACEMENT );
m_cbRepeatedPlacement->SetValue( m_settings->m_DesignBlockChooserPanel.repeated_placement );
m_cbPlaceAsGroup = customizer.AddCheckBox( PLACE_AS_GROUP );

View File

@ -32,10 +32,18 @@ public:
virtual void AddCustomControls( wxFileDialogCustomize& customizer ) override
{
m_simpleSaveAs = customizer.AddRadioButton( _( "Do not update library tables" ) );
m_replaceTableEntry = customizer.AddRadioButton( _( "Update existing library table entry" ) );
m_addGlobalTableEntry = customizer.AddRadioButton( _( "Add new global library table entry" ) );
m_addProjectTableEntry = customizer.AddRadioButton( _( "Add new project library table entry" ) );
wxString padding;
#ifdef __WXMAC__
padding = wxT( " " );
customizer.AddStaticText( padding + wxT( "\n\n" ) ); // Increase height of static box
#endif
// Radio buttons are only grouped if they are consecutive. If we want padding, we need to add it
// to the radio button labels
m_simpleSaveAs = customizer.AddRadioButton( _( "Do not update library tables" ) + padding );
m_replaceTableEntry = customizer.AddRadioButton( _( "Update existing library table entry" ) + padding );
m_addGlobalTableEntry = customizer.AddRadioButton( _( "Add new global library table entry" ) + padding );
m_addProjectTableEntry = customizer.AddRadioButton( _( "Add new project library table entry" ) + padding );
// Note, due to windows api, wx does not actually support calling SetValue( false ) (it asserts)
if( m_option == SYMBOL_SAVEAS_TYPE::NORMAL_SAVE_AS )

View File

@ -31,6 +31,10 @@ public:
virtual void AddCustomControls( wxFileDialogCustomize& customizer ) override
{
#ifdef __WXMAC__
customizer.AddStaticText( wxT( "\n\n" ) ); // Increase height of static box
#endif
m_cb = customizer.AddCheckBox( _( "Embed file" ) );
m_cb->SetValue( m_embed );
}

View File

@ -31,9 +31,15 @@ public:
virtual void AddCustomControls( wxFileDialogCustomize& customizer ) override
{
// Radio buttons are only grouped if they are consecutive. Since we want padding, we need to
// Add padding to the first radio button
m_addGlobalTableEntry = customizer.AddRadioButton( _( "Add new library to global library table" ) );
wxString padding;
#ifdef __WXMAC__
padding = wxT( " " );
customizer.AddStaticText( wxT( "\n\n" ) );
#endif
// Radio buttons are only grouped if they are consecutive. If we want padding, we need to add it to the
// first radio button
m_addGlobalTableEntry = customizer.AddRadioButton( _( "Add new library to global library table" ) + padding );
m_addProjectTableEntry = customizer.AddRadioButton( _( "Add new library to project library table" ) );
if( m_useGlobalTable )

View File

@ -31,6 +31,11 @@ public:
virtual void AddCustomControls( wxFileDialogCustomize& customizer ) override
{
wxString padding;
#ifdef __WXMAC__
customizer.AddStaticText( wxT( "\n\n" ) ); // Increase height of static box
#endif
m_cb = customizer.AddCheckBox( _( "Show import issues" ) );
m_cb->SetValue( m_showIssues );
}

View File

@ -29,6 +29,10 @@ public:
virtual void AddCustomControls( wxFileDialogCustomize& customizer ) override
{
#ifdef __WXMAC__
customizer.AddStaticText( wxT( "\n\n" ) ); // Increase height of static box
#endif
m_cb = customizer.AddCheckBox( _( "Create a new folder for the project" ) );
m_cb->SetValue( true );
}

View File

@ -406,6 +406,10 @@ public:
virtual void AddCustomControls( wxFileDialogCustomize& customizer ) override
{
#ifdef __WXMAC__
customizer.AddStaticText( wxT( "\n\n" ) ); // Increase height of static box
#endif
m_cb = customizer.AddCheckBox( _( "Do not export unconnected pads" ) );
m_cb->SetValue( m_doNotExportUnconnectedPads );
}

View File

@ -29,6 +29,10 @@ public:
virtual void AddCustomControls( wxFileDialogCustomize& customizer ) override
{
#ifdef __WXMAC__
customizer.AddStaticText( wxT( "\n\n" ) ); // Increase height of static box
#endif
m_cb = customizer.AddCheckBox( _( "Create a new project for this board" ) );
m_cb->SetValue( true );