Adjust min sizes of Global Fields editor for Windows.
Also gets rid of a slew of unnecessary sizers in the dialog.
This commit is contained in:
parent
7e47ef7471
commit
442d1169a8
|
@ -375,9 +375,9 @@ DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent
|
|||
|
||||
m_bRefresh->SetBitmap( KiBitmap( refresh_xpm ) );
|
||||
|
||||
m_fieldsCtrl->AppendTextColumn( _( "Field" ), wxDATAVIEW_CELL_INERT );
|
||||
m_fieldsCtrl->AppendToggleColumn( _( "Show" ), wxDATAVIEW_CELL_ACTIVATABLE, 40, wxALIGN_CENTER, 0 );
|
||||
m_fieldsCtrl->AppendToggleColumn( _( "Group By" ), wxDATAVIEW_CELL_ACTIVATABLE, 60, wxALIGN_CENTER, 0 );
|
||||
m_fieldsCtrl->AppendTextColumn( _( "Field" ), wxDATAVIEW_CELL_INERT );
|
||||
m_fieldsCtrl->AppendToggleColumn( _( "Show" ), wxDATAVIEW_CELL_ACTIVATABLE, 50, wxALIGN_CENTER, 0 );
|
||||
m_fieldsCtrl->AppendToggleColumn( _( "Group By" ), wxDATAVIEW_CELL_ACTIVATABLE, 70, wxALIGN_CENTER, 0 );
|
||||
|
||||
// The fact that we're a list should keep the control from reserving space for the
|
||||
// expander buttons... but it doesn't. Fix by forcing the indent to 0.
|
||||
|
@ -407,7 +407,7 @@ DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent
|
|||
}
|
||||
m_grid->SetColFormatNumber( m_dataModel->GetColsCount() - 1 ); // quantities
|
||||
m_grid->SetColMinimalWidth( 0, 100 ); // references
|
||||
m_grid->SetColMinimalWidth( m_dataModel->GetColsCount() - 1, 40 ); // quantities
|
||||
m_grid->SetColMinimalWidth( m_dataModel->GetColsCount() - 1, 50 ); // quantities
|
||||
m_grid->AutoSizeColumns( false );
|
||||
|
||||
m_grid->SetGridCursor( 0, 1 );
|
||||
|
@ -415,8 +415,8 @@ DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent
|
|||
|
||||
m_sdbSizer1OK->SetDefault();
|
||||
|
||||
Layout();
|
||||
SetSizeInDU( 500, 300 );
|
||||
FinishDialogSettings();
|
||||
SetSizeInDU( 600, 300 );
|
||||
Center();
|
||||
|
||||
// Connect Events
|
||||
|
|
|
@ -11,64 +11,51 @@
|
|||
|
||||
DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bHorizontalSizer;
|
||||
bHorizontalSizer = new wxBoxSizer( wxVERTICAL );
|
||||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer61;
|
||||
bSizer61 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_panel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer7;
|
||||
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_splitter1 = new wxSplitterWindow( m_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH );
|
||||
m_splitter1 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE );
|
||||
m_splitter1->Connect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::m_splitter1OnIdle ), NULL, this );
|
||||
m_splitter1->SetMinimumPaneSize( 120 );
|
||||
m_splitter1->SetMinimumPaneSize( 230 );
|
||||
|
||||
m_leftPanel = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer6;
|
||||
bSizer6 = new wxBoxSizer( wxVERTICAL );
|
||||
wxBoxSizer* bLeftSizer;
|
||||
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
|
||||
wxBoxSizer* bGroupSizer;
|
||||
bGroupSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_groupComponentsBox = new wxCheckBox( m_leftPanel, OPT_GROUP_COMPONENTS, _("Group symbols"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_groupComponentsBox->SetValue(true);
|
||||
m_groupComponentsBox->SetToolTip( _("Group components together based on common properties") );
|
||||
|
||||
bSizer8->Add( m_groupComponentsBox, 0, wxALL|wxEXPAND, 5 );
|
||||
bGroupSizer->Add( m_groupComponentsBox, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bGroupSizer->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_bRefresh = new wxBitmapButton( m_leftPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
||||
m_bRefresh->SetMinSize( wxSize( 30,28 ) );
|
||||
|
||||
bSizer8->Add( m_bRefresh, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
bGroupSizer->Add( m_bRefresh, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizer6->Add( bSizer8, 0, wxALL|wxBOTTOM|wxEXPAND|wxTOP, 3 );
|
||||
|
||||
wxBoxSizer* bSizer9;
|
||||
bSizer9 = new wxBoxSizer( wxVERTICAL );
|
||||
bLeftSizer->Add( bGroupSizer, 0, wxALL|wxBOTTOM|wxEXPAND|wxTOP, 3 );
|
||||
|
||||
m_fieldsCtrl = new wxDataViewListCtrl( m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fieldsCtrl->SetMinSize( wxSize( -1,250 ) );
|
||||
m_fieldsCtrl->SetMinSize( wxSize( 220,220 ) );
|
||||
|
||||
bSizer9->Add( m_fieldsCtrl, 1, wxALL|wxEXPAND, 5 );
|
||||
bLeftSizer->Add( m_fieldsCtrl, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizer6->Add( bSizer9, 5, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_leftPanel->SetSizer( bSizer6 );
|
||||
m_leftPanel->SetSizer( bLeftSizer );
|
||||
m_leftPanel->Layout();
|
||||
bSizer6->Fit( m_leftPanel );
|
||||
bLeftSizer->Fit( m_leftPanel );
|
||||
m_panel4 = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer5;
|
||||
bSizer5 = new wxBoxSizer( wxVERTICAL );
|
||||
wxBoxSizer* bRightSizer;
|
||||
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_grid = new wxGrid( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
|
@ -94,20 +81,16 @@ DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* pa
|
|||
|
||||
// Cell Defaults
|
||||
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||
bSizer5->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
|
||||
m_grid->SetMinSize( wxSize( 400,240 ) );
|
||||
|
||||
bRightSizer->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panel4->SetSizer( bSizer5 );
|
||||
m_panel4->SetSizer( bRightSizer );
|
||||
m_panel4->Layout();
|
||||
bSizer5->Fit( m_panel4 );
|
||||
m_splitter1->SplitVertically( m_leftPanel, m_panel4, 200 );
|
||||
bSizer7->Add( m_splitter1, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panel->SetSizer( bSizer7 );
|
||||
m_panel->Layout();
|
||||
bSizer7->Fit( m_panel );
|
||||
bSizer61->Add( m_panel, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
bRightSizer->Fit( m_panel4 );
|
||||
m_splitter1->SplitVertically( m_leftPanel, m_panel4, 230 );
|
||||
bMainSizer->Add( m_splitter1, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||
|
@ -116,15 +99,12 @@ DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* pa
|
|||
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
||||
m_sdbSizer1->Realize();
|
||||
|
||||
bSizer61->Add( m_sdbSizer1, 0, wxEXPAND, 5 );
|
||||
bMainSizer->Add( m_sdbSizer1, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bHorizontalSizer->Add( bSizer61, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bHorizontalSizer );
|
||||
this->SetSizer( bMainSizer );
|
||||
this->Layout();
|
||||
bHorizontalSizer->Fit( this );
|
||||
bMainSizer->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -42,7 +42,6 @@ class DIALOG_FIELDS_EDITOR_GLOBAL_BASE : public DIALOG_SHIM
|
|||
private:
|
||||
|
||||
protected:
|
||||
wxPanel* m_panel;
|
||||
wxSplitterWindow* m_splitter1;
|
||||
wxPanel* m_leftPanel;
|
||||
wxCheckBox* m_groupComponentsBox;
|
||||
|
@ -72,7 +71,7 @@ class DIALOG_FIELDS_EDITOR_GLOBAL_BASE : public DIALOG_SHIM
|
|||
|
||||
void m_splitter1OnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitter1->SetSashPosition( 200 );
|
||||
m_splitter1->SetSashPosition( 230 );
|
||||
m_splitter1->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::m_splitter1OnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue