mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-03-30 04:56:54 +00:00
Fix layout issues in print dialog controls.
This commit is contained in:
parent
fec6882e0a
commit
ec649593ae
common/dialogs
gerbview/dialogs
pcbnew/dialogs
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767)
|
||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -36,13 +36,13 @@ DIALOG_PRINT_GENERIC_BASE::DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindow
|
||||
int m_outputModeNChoices = sizeof( m_outputModeChoices ) / sizeof( wxString );
|
||||
m_outputMode = new wxChoice( m_sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_outputModeNChoices, m_outputModeChoices, 0 );
|
||||
m_outputMode->SetSelection( 0 );
|
||||
m_gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
m_gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_titleBlock = new wxCheckBox( m_sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_titleBlock->SetValue(true);
|
||||
m_titleBlock->SetToolTip( _("Print Frame references.") );
|
||||
|
||||
m_gbOptionsSizer->Add( m_titleBlock, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
m_gbOptionsSizer->Add( m_titleBlock, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_gbOptionsSizer->AddGrowableCol( 1 );
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767)
|
||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -42,8 +42,8 @@ class DIALOG_PRINT_GENERIC_BASE : public DIALOG_SHIM
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_FRAME_SEL = 1000,
|
||||
wxID_PRINT_OPTIONS
|
||||
wxID_FRAME_SEL = 8200,
|
||||
wxID_PRINT_OPTIONS,
|
||||
};
|
||||
|
||||
wxBoxSizer* m_bUpperSizer;
|
||||
|
@ -175,9 +175,8 @@ void DIALOG_PRINT_GERBVIEW::createExtraOptions()
|
||||
|
||||
void DIALOG_PRINT_GERBVIEW::createLeftPanel()
|
||||
{
|
||||
wxStaticBoxSizer* sbLayersSizer =
|
||||
new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _( "Included Layers" ) ),
|
||||
wxVERTICAL );
|
||||
wxStaticBox* box = new wxStaticBox( this, wxID_ANY, _( "Include Layers" ) );
|
||||
wxStaticBoxSizer* sbLayersSizer = new wxStaticBoxSizer( box, wxVERTICAL );
|
||||
|
||||
// Layer lists
|
||||
wxBoxSizer* bLayerListsSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
@ -188,9 +187,9 @@ void DIALOG_PRINT_GERBVIEW::createLeftPanel()
|
||||
bLayerListsSizer->Add( m_layerLists[i], 1, wxEXPAND, 5 );
|
||||
}
|
||||
|
||||
|
||||
// Select/Unselect all buttons
|
||||
m_buttonSelectAll = new wxButton( sbLayersSizer->GetStaticBox(), wxID_ANY, _( "Select all" ) );
|
||||
m_buttonSelectAll = new wxButton( sbLayersSizer->GetStaticBox(), wxID_ANY,
|
||||
_( "Select all" ) );
|
||||
m_buttonDeselectAll = new wxButton( sbLayersSizer->GetStaticBox(), wxID_ANY,
|
||||
_( "Deselect all" ) );
|
||||
|
||||
@ -206,10 +205,10 @@ void DIALOG_PRINT_GERBVIEW::createLeftPanel()
|
||||
buttonSizer->Add( m_buttonDeselectAll, 1, wxALL, 5 );
|
||||
|
||||
// Static box sizer layout
|
||||
sbLayersSizer->Add( bLayerListsSizer, 1, wxALL | wxEXPAND, 5 );
|
||||
sbLayersSizer->Add( buttonSizer, 0, wxALL | wxEXPAND, 5 );
|
||||
sbLayersSizer->Add( bLayerListsSizer, 1, wxEXPAND, 5 );
|
||||
sbLayersSizer->Add( buttonSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND );
|
||||
getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND | wxALL, 5 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -108,7 +108,22 @@ DIALOG_PRINT_PCBNEW::DIALOG_PRINT_PCBNEW( PCB_BASE_EDIT_FRAME* aParent,
|
||||
createExtraOptions();
|
||||
createLeftPanel();
|
||||
|
||||
m_infoText->SetFont( KIUI::GetInfoFont( this ) );
|
||||
BOARD* board = m_parent->GetBoard();
|
||||
|
||||
// Create layer list
|
||||
// Could devote a PlotOrder() function in place of UIOrder().
|
||||
m_layerList = board->GetEnabledLayers().UIOrder();
|
||||
|
||||
// Populate the check list box by all enabled layers names
|
||||
for( PCB_LAYER_ID layer : m_layerList )
|
||||
{
|
||||
int checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) );
|
||||
|
||||
if( settings()->m_LayerSet.test( layer ) )
|
||||
m_layerCheckListBox->Check( checkIndex );
|
||||
}
|
||||
|
||||
m_infoText->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||
m_infoText->SetLabel( _( "Right-click for layer selection commands." ) );
|
||||
m_infoText->Show( true );
|
||||
|
||||
@ -139,21 +154,6 @@ bool DIALOG_PRINT_PCBNEW::TransferDataToWindow()
|
||||
if( !DIALOG_PRINT_GENERIC::TransferDataToWindow() )
|
||||
return false;
|
||||
|
||||
BOARD* board = m_parent->GetBoard();
|
||||
|
||||
// Create layer list
|
||||
// Could devote a PlotOrder() function in place of UIOrder().
|
||||
m_layerList = board->GetEnabledLayers().UIOrder();
|
||||
|
||||
// Populate the check list box by all enabled layers names
|
||||
for( PCB_LAYER_ID layer : m_layerList )
|
||||
{
|
||||
int checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) );
|
||||
|
||||
if( settings()->m_LayerSet.test( layer ) )
|
||||
m_layerCheckListBox->Check( checkIndex );
|
||||
}
|
||||
|
||||
m_checkAsItems->SetValue( settings()->m_AsItemCheckboxes );
|
||||
m_checkboxMirror->SetValue( settings()->m_Mirror );
|
||||
m_titleBlock->SetValue( settings()->m_titleBlock );
|
||||
@ -195,9 +195,6 @@ bool DIALOG_PRINT_PCBNEW::TransferDataToWindow()
|
||||
== PCBNEW_PRINTOUT_SETTINGS::LAYER_PER_PAGE );
|
||||
onPagePerLayerClicked( dummy );
|
||||
|
||||
// Update the dialog layout when layers are added
|
||||
GetSizer()->Fit( this );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -207,32 +204,29 @@ void DIALOG_PRINT_PCBNEW::createExtraOptions()
|
||||
wxGridBagSizer* optionsSizer = getOptionsSizer();
|
||||
wxStaticBox* box = getOptionsBox();
|
||||
int rows = optionsSizer->GetEffectiveRowsCount();
|
||||
int cols = optionsSizer->GetEffectiveColsCount();
|
||||
|
||||
m_checkAsItems = new wxCheckBox( box, wxID_ANY,
|
||||
_( "Print according to objects tab of appearance manager" ) );
|
||||
optionsSizer->Add( m_checkAsItems, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
|
||||
m_checkAsItems = new wxCheckBox( box, wxID_ANY, _( "Print according to objects tab of "
|
||||
"appearance manager" ) );
|
||||
optionsSizer->Add( m_checkAsItems, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
|
||||
wxLEFT|wxRIGHT|wxBOTTOM, 5 );
|
||||
|
||||
m_checkBackground = new wxCheckBox( box, wxID_ANY, _( "Print background color" ) );
|
||||
optionsSizer->Add( m_checkBackground, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
|
||||
optionsSizer->Add( m_checkBackground, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
|
||||
wxLEFT|wxRIGHT|wxBOTTOM, 5 );
|
||||
|
||||
m_checkUseTheme = new wxCheckBox( box, wxID_ANY,
|
||||
_( "Use a different color theme for printing:" ) );
|
||||
optionsSizer->Add( m_checkUseTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
|
||||
m_checkUseTheme = new wxCheckBox( box, wxID_ANY, _( "Use a different color theme for "
|
||||
"printing:" ) );
|
||||
optionsSizer->Add( m_checkUseTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
|
||||
wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkUseTheme->Bind( wxEVT_COMMAND_CHECKBOX_CLICKED,
|
||||
&DIALOG_PRINT_PCBNEW::onUseThemeClicked, this );
|
||||
|
||||
wxArrayString m_colorThemeChoices;
|
||||
m_colorTheme = new wxChoice( box, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
m_colorThemeChoices, 0 );
|
||||
wxArrayString choices;
|
||||
m_colorTheme = new wxChoice( box, wxID_ANY, wxDefaultPosition, wxDefaultSize, choices, 0 );
|
||||
m_colorTheme->SetSelection( 0 );
|
||||
|
||||
optionsSizer->Add( m_colorTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
|
||||
wxLEFT, 28 );
|
||||
m_colorTheme->SetMinSize( { 200, -1 } );
|
||||
optionsSizer->Add( m_colorTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ), wxLEFT, 28 );
|
||||
|
||||
rows++;
|
||||
|
||||
@ -247,13 +241,13 @@ void DIALOG_PRINT_PCBNEW::createExtraOptions()
|
||||
|
||||
optionsSizer->Add( drillMarksLabel, wxGBPosition( rows, 0 ), wxGBSpan( 1, 1 ),
|
||||
wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
|
||||
optionsSizer->Add( m_drillMarksChoice, wxGBPosition( rows++, 1 ), wxGBSpan( 1, cols - 1 ),
|
||||
wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
|
||||
optionsSizer->Add( m_drillMarksChoice, wxGBPosition( rows++, 1 ), wxGBSpan( 1, 1 ),
|
||||
wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 );
|
||||
|
||||
// Print mirrored
|
||||
m_checkboxMirror = new wxCheckBox( box, wxID_ANY, _( "Print mirrored" ) );
|
||||
|
||||
optionsSizer->Add( m_checkboxMirror, wxGBPosition( rows++, 0 ), wxGBSpan( 1, cols ),
|
||||
optionsSizer->Add( m_checkboxMirror, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
|
||||
wxLEFT|wxRIGHT|wxBOTTOM, 5 );
|
||||
|
||||
// Pagination
|
||||
@ -265,9 +259,9 @@ void DIALOG_PRINT_PCBNEW::createExtraOptions()
|
||||
m_checkboxEdgesOnAllPages = new wxCheckBox( box, wxID_ANY,
|
||||
_( "Print board edges on all pages" ) );
|
||||
|
||||
optionsSizer->Add( m_checkboxPagePerLayer, wxGBPosition( rows++, 0 ), wxGBSpan( 1, cols ),
|
||||
optionsSizer->Add( m_checkboxPagePerLayer, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
|
||||
wxLEFT|wxRIGHT, 5 );
|
||||
optionsSizer->Add( m_checkboxEdgesOnAllPages, wxGBPosition( rows++, 0 ), wxGBSpan( 1, cols ),
|
||||
optionsSizer->Add( m_checkboxEdgesOnAllPages, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
|
||||
wxLEFT, 28 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user