Eeschema: dialogs: incorrect sizes fixes and osx copy text fix

This commit is contained in:
jean-pierre charras 2016-07-18 09:04:13 +02:00
commit f83a76a970
30 changed files with 123 additions and 65 deletions

View File

@ -237,8 +237,10 @@ DIALOG_BOM::DIALOG_BOM( SCH_EDIT_FRAME* parent ) :
m_checkBoxShowConsole->Show( true ); m_checkBoxShowConsole->Show( true );
#endif #endif
GetSizer()->Fit( this ); FixOSXCancelButtonIssue();
Centre();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }
DIALOG_BOM::~DIALOG_BOM() DIALOG_BOM::~DIALOG_BOM()

View File

@ -49,8 +49,11 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRA
initDlg(); initDlg();
GetSizer()->SetSizeHints( this );
Center(); FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -126,6 +126,13 @@ private:
void showButtonHandler( wxCommandEvent& event ); void showButtonHandler( wxCommandEvent& event );
void OnTestChipName( wxCommandEvent& event ); void OnTestChipName( wxCommandEvent& event );
void OnSelectChipName( wxCommandEvent& event ); void OnSelectChipName( wxCommandEvent& event );
void OnInitDlg( wxInitDialogEvent& event )
{
TransferDataToWindow();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}
SCH_FIELD* findField( const wxString& aFieldName ); SCH_FIELD* findField( const wxString& aFieldName );
@ -201,11 +208,11 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow
m_staticTextUnitPosY->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) ); m_staticTextUnitPosY->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
wxToolTip::Enable( true ); wxToolTip::Enable( true );
GetSizer()->SetSizeHints( this );
Center();
stdDialogButtonSizerOK->SetDefault(); stdDialogButtonSizerOK->SetDefault();
FixOSXCancelButtonIssue();
Fit();
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar 28 2015) // C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -290,6 +290,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
// Connect Events // Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) ); this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) );
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnInitDlg ) );
m_buttonTestChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this ); m_buttonTestChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this );
m_buttonSelectChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this ); m_buttonSelectChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this );
defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this ); defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
@ -307,6 +308,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
{ {
// Disconnect Events // Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) ); this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnInitDlg ) );
m_buttonTestChipName->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this ); m_buttonTestChipName->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this );
m_buttonSelectChipName->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this ); m_buttonSelectChipName->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this );
defaultsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this ); defaultsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );

View File

@ -67,7 +67,7 @@
<event name="OnHibernate"></event> <event name="OnHibernate"></event>
<event name="OnIconize"></event> <event name="OnIconize"></event>
<event name="OnIdle"></event> <event name="OnIdle"></event>
<event name="OnInitDialog"></event> <event name="OnInitDialog">OnInitDlg</event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
<event name="OnKeyUp"></event> <event name="OnKeyUp"></event>
<event name="OnKillFocus"></event> <event name="OnKillFocus"></event>
@ -112,6 +112,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">optionsSizer</property> <property name="name">optionsSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -740,6 +741,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sbSizerChipName</property> <property name="name">sbSizerChipName</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -777,7 +779,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -1140,7 +1142,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -1377,6 +1379,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">fieldsSizer</property> <property name="name">fieldsSizer</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -1389,6 +1392,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">gridStaticBoxSizer</property> <property name="name">gridStaticBoxSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -1981,6 +1985,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">visibilitySizer</property> <property name="name">visibilitySizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -2380,7 +2385,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -2554,7 +2559,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -2834,7 +2839,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -3091,7 +3096,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -3348,7 +3353,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar 28 2015) // C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -85,6 +85,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); } virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); }
virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnTestChipName( wxCommandEvent& event ) { event.Skip(); } virtual void OnTestChipName( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSelectChipName( wxCommandEvent& event ) { event.Skip(); } virtual void OnSelectChipName( wxCommandEvent& event ) { event.Skip(); }
virtual void SetInitCmp( wxCommandEvent& event ) { event.Skip(); } virtual void SetInitCmp( wxCommandEvent& event ) { event.Skip(); }

View File

@ -110,12 +110,10 @@ DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTe
m_CurrentText = aTextItem; m_CurrentText = aTextItem;
InitDialog(); InitDialog();
GetSizer()->SetSizeHints( this ); FixOSXCancelButtonIssue();
Layout();
Fit();
SetMinSize( GetBestSize() );
Centre(); // Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -171,9 +171,6 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB(
m_parent = aParent; m_parent = aParent;
m_libEntry = aLibEntry; m_libEntry = aLibEntry;
m_skipCopyFromPanel = false; m_skipCopyFromPanel = false;
GetSizer()->SetSizeHints( this );
Centre();
} }
@ -198,6 +195,11 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog( wxInitDialogEvent& event
copySelectedFieldToPanel(); copySelectedFieldToPanel();
stdDialogButtonSizerOK->SetDefault(); stdDialogButtonSizerOK->SetDefault();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -138,8 +138,11 @@ void DIALOG_EDIT_ONE_FIELD::init()
} }
m_sdbSizerButtonsOK->SetDefault(); m_sdbSizerButtonsOK->SetDefault();
GetSizer()->SetSizeHints( this );
Centre(); FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -44,9 +44,6 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( SCH_EDIT_FRAME* parent ) :
m_choiceUnits->SetFocus(); m_choiceUnits->SetFocus();
m_sdbSizerOK->SetDefault(); m_sdbSizerOK->SetDefault();
// Dialog should not shrink beyond it's minimal size.
GetSizer()->SetSizeHints( this );
// wxformbuilder doesn't seem to let us set minimal sizes. Copy the default // wxformbuilder doesn't seem to let us set minimal sizes. Copy the default
// sizes into the minimal sizes, then, and autosize: // sizes into the minimal sizes, then, and autosize:
for( int i = 0; i < m_fieldGrid->GetNumberCols(); ++i ) for( int i = 0; i < m_fieldGrid->GetNumberCols(); ++i )
@ -76,6 +73,11 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( SCH_EDIT_FRAME* parent ) :
} }
Layout(); Layout();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -77,8 +77,10 @@ DIALOG_ERC::DIALOG_ERC( SCH_EDIT_FRAME* parent ) :
m_lastMarkerFound = NULL; m_lastMarkerFound = NULL;
Init(); Init();
GetSizer()->SetSizeHints( this ); FixOSXCancelButtonIssue();
Centre();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors. * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar 28 2015) // C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -91,14 +91,14 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
wxBoxSizer* bbuttonsSizer; wxBoxSizer* bbuttonsSizer;
bbuttonsSizer = new wxBoxSizer( wxHORIZONTAL ); bbuttonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_buttondelmarkers = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("&Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttondelmarkers = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttondelmarkers, 0, wxALL|wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttondelmarkers, 0, wxALL|wxEXPAND, 5 );
m_buttonERC = new wxButton( m_PanelERC, ID_ERC_CMP, _("&Run"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonERC = new wxButton( m_PanelERC, ID_ERC_CMP, _("Run"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonERC->SetDefault(); m_buttonERC->SetDefault();
bbuttonsSizer->Add( m_buttonERC, 0, wxALL|wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttonERC, 0, wxALL|wxEXPAND, 5 );
m_buttonClose = new wxButton( m_PanelERC, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonClose = new wxButton( m_PanelERC, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );

View File

@ -277,6 +277,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sdiagSizer</property> <property name="name">sdiagSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -409,7 +410,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -583,7 +584,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -757,7 +758,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -1113,7 +1114,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength"></property> <property name="maxlength">0</property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size">-1,-1</property> <property name="minimum_size">-1,-1</property>
@ -1382,7 +1383,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_ERASE_DRC_MARKERS</property> <property name="id">ID_ERASE_DRC_MARKERS</property>
<property name="label">&amp;Delete Markers</property> <property name="label">Delete Markers</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1470,7 +1471,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_ERC_CMP</property> <property name="id">ID_ERC_CMP</property>
<property name="label">&amp;Run</property> <property name="label">Run</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1558,7 +1559,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_CANCEL</property> <property name="id">wxID_CANCEL</property>
<property name="label">&amp;Close</property> <property name="label">Close</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar 28 2015) // C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!

View File

@ -37,6 +37,11 @@ DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM( wxWindow* parent,
// Required under wxGTK if we want to dismiss the dialog with the ESC key // Required under wxGTK if we want to dismiss the dialog with the ESC key
SetFocus(); SetFocus();
m_sdbSizer1OK->SetDefault(); m_sdbSizer1OK->SetDefault();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -46,7 +46,7 @@
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Drawing Properties</property> <property name="title">Drawing Properties</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 6 2016) // C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -9,7 +9,7 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_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( wxDefaultSize, wxDefaultSize );

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 6 2016) // C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -11,6 +11,9 @@
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
@ -29,7 +32,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_DRAW_ITEM_BASE /// Class DIALOG_LIB_EDIT_DRAW_ITEM_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public wxDialog class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public DIALOG_SHIM
{ {
private: private:

View File

@ -50,8 +50,6 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( EDA_DRAW_FRAME* parent, LIB_PIN* aPin
m_textPadName->MoveAfterInTabOrder(m_textPinName); m_textPadName->MoveAfterInTabOrder(m_textPinName);
m_sdbSizerButtonsOK->SetDefault(); m_sdbSizerButtonsOK->SetDefault();
GetSizer()->SetSizeHints( this );
// On some windows manager (Unity, XFCE), this dialog is // On some windows manager (Unity, XFCE), this dialog is
// not always raised, depending on this dialog is run. // not always raised, depending on this dialog is run.
// Force it to be raised // Force it to be raised
@ -67,6 +65,11 @@ DIALOG_LIB_EDIT_PIN::~DIALOG_LIB_EDIT_PIN()
void DIALOG_LIB_EDIT_PIN::OnInitDialog( wxInitDialogEvent& event ) void DIALOG_LIB_EDIT_PIN::OnInitDialog( wxInitDialogEvent& event )
{ {
m_textPinName->SetFocus(); m_textPinName->SetFocus();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }
/* /*

View File

@ -48,8 +48,10 @@ DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT( LIB_EDIT_FRAME* aParent, LIB_TEXT* a
m_graphicText = aText; m_graphicText = aText;
initDlg(); initDlg();
GetSizer()->SetSizeHints(this); FixOSXCancelButtonIssue();
Centre();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -32,4 +32,9 @@ DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT( wxWindow* parent ) :
// What happens when user presses "Enter"? OK button! OK? // What happens when user presses "Enter"? OK button! OK?
m_sdbSizerOK->SetDefault(); m_sdbSizerOK->SetDefault();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 10 2016) // C++ code generated with wxFormBuilder (version May 6 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!

View File

@ -44,7 +44,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DIALOG_LIBEDIT_OPTIONS_BASE</property> <property name="name">DIALOG_LIBEDIT_OPTIONS_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">499,528</property> <property name="size">499,368</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Library Editor Options</property> <property name="title">Library Editor Options</property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 10 2016) // C++ code generated with wxFormBuilder (version May 6 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -74,7 +74,7 @@ class DIALOG_LIBEDIT_OPTIONS_BASE : public DIALOG_SHIM
public: public:
DIALOG_LIBEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 499,528 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_LIBEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 499,368 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIBEDIT_OPTIONS_BASE(); ~DIALOG_LIBEDIT_OPTIONS_BASE();
}; };

View File

@ -343,9 +343,11 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) :
InstallCustomPages(); InstallCustomPages();
SetDefaultItem( m_buttonNetlist ); SetDefaultItem( m_buttonNetlist );
GetSizer()->SetSizeHints( this );
Centre(); FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -75,9 +75,11 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) :
initDlg(); initDlg();
GetSizer()->SetSizeHints( this );
Centre(); FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -48,6 +48,12 @@ DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN( wxWindow* parent ) :
m_textName->SetFocus(); m_textName->SetFocus();
m_sdbSizerOK->SetDefault(); m_sdbSizerOK->SetDefault();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
// On some windows manager (Unity, XFCE), this dialog is // On some windows manager (Unity, XFCE), this dialog is
// not always raised, depending on this dialog is run. // not always raised, depending on this dialog is run.
// Force it to be raised // Force it to be raised

View File

@ -34,7 +34,10 @@ DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS( wxWindow* parent ) :
m_textFileName->SetFocus(); m_textFileName->SetFocus();
m_sdbSizer1OK->SetDefault(); m_sdbSizer1OK->SetDefault();
GetSizer()->Fit( this ); FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
} }

View File

@ -87,7 +87,6 @@ DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent
m_LastSelected3DShapeIndex = 0; m_LastSelected3DShapeIndex = 0;
m_OrientValue = 0; m_OrientValue = 0;
Layout(); Layout();
} }