Commit 3e8c0de9 authored by Christophe Mutricy's avatar Christophe Mutricy

wx/dilaogs/ : Fix button alignment in dialogs (refs #470)

parent 8a764762
...@@ -80,16 +80,15 @@ ItemInfoDialog::ItemInfoDialog( intf_thread_t *_p_intf, ...@@ -80,16 +80,15 @@ ItemInfoDialog::ItemInfoDialog( intf_thread_t *_p_intf,
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL ); wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
/* Place everything in sizers */ /* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL ); wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->Add( ok_button, 0, wxALL, 5 ); button_sizer->AddButton( ok_button );
button_sizer->Add( cancel_button, 0, wxALL, 5 ); button_sizer->AddButton( cancel_button );
button_sizer->Layout(); button_sizer->Realize();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( info_panel, 1, wxEXPAND | wxALL, 5 ); panel_sizer->Add( info_panel, 1, wxEXPAND | wxALL, 5 );
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 ); panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM | panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
wxALL, 5 );
panel_sizer->Layout(); panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer ); panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 ); main_sizer->Add( panel, 1, wxGROW, 0 );
......
...@@ -321,11 +321,11 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog, ...@@ -321,11 +321,11 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
ok_button->SetDefault(); ok_button->SetDefault();
wxButton *cancel_button = wxButton *cancel_button =
new wxButton( p_advanced_dialog, wxID_CANCEL ); new wxButton( p_advanced_dialog, wxID_CANCEL );
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL ); wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->Add( ok_button, 0, wxALL, 5 ); button_sizer->AddButton( ok_button );
button_sizer->Add( cancel_button, 0, wxALL, 5 ); button_sizer->AddButton( cancel_button );
button_sizer->Layout(); button_sizer->Realize();
sizer->Add( button_sizer, 0, wxALL, 0 ); sizer->Add( button_sizer, 0, wxEXPAND|wxALL, 5 );
sizer->SetMinSize( 400, -1 ); sizer->SetMinSize( 400, -1 );
p_advanced_dialog->SetSizerAndFit( sizer ); p_advanced_dialog->SetSizerAndFit( sizer );
...@@ -562,10 +562,10 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, ...@@ -562,10 +562,10 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
OnPageChange( event ); OnPageChange( event );
/* Place everything in sizers */ /* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL ); wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->Add( cancel_button, 0, wxALL, 5 ); button_sizer->AddButton( cancel_button );
button_sizer->Add( ok_button, 0, wxALL, 5 ); button_sizer->AddButton( ok_button );
button_sizer->Layout(); button_sizer->Realize();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
#if (!wxCHECK_VERSION(2,5,2)) #if (!wxCHECK_VERSION(2,5,2))
...@@ -575,7 +575,7 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, ...@@ -575,7 +575,7 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
#endif #endif
panel_sizer->Add( adv_sizer, 0, wxEXPAND | wxALL, 5 ); panel_sizer->Add( adv_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 ); panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_RIGHT | wxALL, 5 ); panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Layout(); panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer ); panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 ); main_sizer->Add( panel, 1, wxGROW, 0 );
......
...@@ -197,10 +197,10 @@ SoutDialog::SoutDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ): ...@@ -197,10 +197,10 @@ SoutDialog::SoutDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL ); wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
/* Place everything in sizers */ /* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL ); wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->Add( ok_button, 0, wxALL, 5 ); button_sizer->AddButton( ok_button );
button_sizer->Add( cancel_button, 0, wxALL, 5 ); button_sizer->AddButton( cancel_button );
button_sizer->Layout(); button_sizer->Realize();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( mrl_sizer_sizer, 0, wxEXPAND, 5 ); panel_sizer->Add( mrl_sizer_sizer, 0, wxEXPAND, 5 );
...@@ -208,8 +208,7 @@ SoutDialog::SoutDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ): ...@@ -208,8 +208,7 @@ SoutDialog::SoutDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
panel_sizer->Add( encapsulation_panel, 0, wxEXPAND | wxALL, 5 ); panel_sizer->Add( encapsulation_panel, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( transcoding_panel, 0, wxEXPAND | wxALL, 5 ); panel_sizer->Add( transcoding_panel, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( misc_panel, 0, wxEXPAND | wxALL, 5 ); panel_sizer->Add( misc_panel, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM | panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
wxALL, 5 );
panel_sizer->Layout(); panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer ); panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 ); main_sizer->Add( panel, 1, wxGROW, 0 );
......
...@@ -244,14 +244,13 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ): ...@@ -244,14 +244,13 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL ); wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
/* Place everything in sizers */ /* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL ); wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->Add( ok_button, 0, wxALL, 5 ); button_sizer->AddButton( ok_button );
button_sizer->Add( cancel_button, 0, wxALL, 5 ); button_sizer->AddButton( cancel_button );
button_sizer->Layout(); button_sizer->Realize();
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 ); panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM | panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
wxALL, 5 );
panel_sizer->Layout(); panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer ); panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 ); main_sizer->Add( panel, 1, wxGROW, 0 );
......
...@@ -40,9 +40,9 @@ enum ...@@ -40,9 +40,9 @@ enum
BEGIN_EVENT_TABLE( VLMPanel, wxPanel) BEGIN_EVENT_TABLE( VLMPanel, wxPanel)
EVT_TIMER( Timer_Event, VLMPanel::OnTimer ) EVT_TIMER( Timer_Event, VLMPanel::OnTimer )
EVT_BUTTON( wxID_CLOSE, VLMPanel::OnClose ) EVT_BUTTON( Close_Event, VLMPanel::OnClose )
EVT_BUTTON( Load_Event, VLMPanel::OnLoad ) EVT_BUTTON( Load_Event, VLMPanel::OnLoad )
EVT_BUTTON( wxID_SAVE, VLMPanel::OnSave ) EVT_BUTTON( Save_Event, VLMPanel::OnSave )
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -75,10 +75,10 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) : ...@@ -75,10 +75,10 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
#endif #endif
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( new wxButton( this, wxID_CLOSE )); button_sizer->Add( new wxButton( this, Close_Event, wxU(_("Close") ) ) );
button_sizer->Add( 0, 0, 1 ); button_sizer->Add( 0, 0, 1 );
button_sizer->Add( new wxButton( this, Load_Event, wxU(_("Load") ) ), 0, wxRIGHT, 10 ); button_sizer->Add( new wxButton( this, Load_Event, wxU(_("Load") ) ), 0, wxRIGHT, 10 );
button_sizer->Add( new wxButton( this, wxID_SAVE )); button_sizer->Add( new wxButton( this, Save_Event, wxU(_("Save") ) ) );
panel_sizer->Add( button_sizer, 0 , wxEXPAND | wxALL, 5 ); panel_sizer->Add( button_sizer, 0 , wxEXPAND | wxALL, 5 );
panel_sizer->Layout(); panel_sizer->Layout();
...@@ -409,7 +409,8 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf, ...@@ -409,7 +409,8 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf,
if( !b_edit ) if( !b_edit )
{ {
lower_sizer->Add( new wxButton( this, wxID_CLEAR ), lower_sizer->Add( new wxButton( this, Clear_Event,
wxU( _( "Clear" ) ) ),
0 , wxEXPAND | wxALL , 5 ); 0 , wxEXPAND | wxALL , 5 );
} }
lower_sizer->Add( new wxButton( this, Create_Event, lower_sizer->Add( new wxButton( this, Create_Event,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment