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,
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
/* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Layout();
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->AddButton( ok_button );
button_sizer->AddButton( cancel_button );
button_sizer->Realize();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( info_panel, 1, wxEXPAND | wxALL, 5 );
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM |
wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 );
......
......@@ -321,11 +321,11 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
ok_button->SetDefault();
wxButton *cancel_button =
new wxButton( p_advanced_dialog, wxID_CANCEL );
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Layout();
sizer->Add( button_sizer, 0, wxALL, 0 );
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->AddButton( ok_button );
button_sizer->AddButton( cancel_button );
button_sizer->Realize();
sizer->Add( button_sizer, 0, wxEXPAND|wxALL, 5 );
sizer->SetMinSize( 400, -1 );
p_advanced_dialog->SetSizerAndFit( sizer );
......@@ -562,10 +562,10 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
OnPageChange( event );
/* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Layout();
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->AddButton( cancel_button );
button_sizer->AddButton( ok_button );
button_sizer->Realize();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
#if (!wxCHECK_VERSION(2,5,2))
......@@ -575,7 +575,7 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
#endif
panel_sizer->Add( adv_sizer, 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->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 );
......
......@@ -197,10 +197,10 @@ SoutDialog::SoutDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
/* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Layout();
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->AddButton( ok_button );
button_sizer->AddButton( cancel_button );
button_sizer->Realize();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( mrl_sizer_sizer, 0, wxEXPAND, 5 );
......@@ -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( transcoding_panel, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( misc_panel, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM |
wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 );
......
......@@ -244,14 +244,13 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
/* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Layout();
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->AddButton( ok_button );
button_sizer->AddButton( cancel_button );
button_sizer->Realize();
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM |
wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 );
......
......@@ -40,9 +40,9 @@ enum
BEGIN_EVENT_TABLE( VLMPanel, wxPanel)
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( wxID_SAVE, VLMPanel::OnSave )
EVT_BUTTON( Save_Event, VLMPanel::OnSave )
END_EVENT_TABLE()
......@@ -75,10 +75,10 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
#endif
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( 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->Layout();
......@@ -409,7 +409,8 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf,
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 );
}
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