Commit 2c208e64 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: additional small fixes.
parent c7cf1f08
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc * interface.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.8 2002/11/23 16:17:12 gbazin Exp $ * $Id: interface.cpp,v 1.9 2002/11/23 18:42:59 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -156,10 +156,13 @@ Interface::Interface( intf_thread_t *_p_intf ): ...@@ -156,10 +156,13 @@ Interface::Interface( intf_thread_t *_p_intf ):
SetTitle( COPYRIGHT_MESSAGE ); SetTitle( COPYRIGHT_MESSAGE );
/* Make sure we've got the right background colour */
SetBackgroundColour( slider_frame->GetBackgroundColour() );
/* Layout everything */ /* Layout everything */
SetAutoLayout( TRUE ); SetAutoLayout( TRUE );
frame_sizer->Layout(); frame_sizer->Layout();
frame_sizer->SetSizeHints(this); frame_sizer->Fit(this);
/* Associate drop targets with the main interface */ /* Associate drop targets with the main interface */
SetDropTarget( new DragAndDrop( p_intf ) ); SetDropTarget( new DragAndDrop( p_intf ) );
...@@ -289,7 +292,7 @@ void Interface::CreateOurToolBar() ...@@ -289,7 +292,7 @@ void Interface::CreateOurToolBar()
void Interface::CreateOurSlider() void Interface::CreateOurSlider()
{ {
/* Create a new frame containing the slider */ /* Create a new frame containing the slider */
slider_frame = new wxPanel( this, -1, wxDefaultPosition, wxSize(-1,50) ); slider_frame = new wxPanel( this, -1, wxDefaultPosition, wxDefaultSize );
slider_frame->SetAutoLayout( TRUE ); slider_frame->SetAutoLayout( TRUE );
slider_frame->Hide(); slider_frame->Hide();
...@@ -300,12 +303,14 @@ void Interface::CreateOurSlider() ...@@ -300,12 +303,14 @@ void Interface::CreateOurSlider()
wxStaticBoxSizer *slider_sizer = wxStaticBoxSizer *slider_sizer =
new wxStaticBoxSizer( slider_box, wxHORIZONTAL ); new wxStaticBoxSizer( slider_box, wxHORIZONTAL );
slider_frame->SetSizer( slider_sizer ); slider_frame->SetSizer( slider_sizer );
slider_sizer->SetMinSize( -1, 50 );
/* Create slider */ /* Create slider */
slider = new wxSlider( slider_frame, SliderScroll_Event, 0, 0, slider = new wxSlider( slider_frame, SliderScroll_Event, 0, 0,
SLIDER_MAX_POS, wxDefaultPosition, wxDefaultSize ); SLIDER_MAX_POS, wxDefaultPosition, wxDefaultSize );
slider_sizer->Add( slider, 1, wxGROW | wxALL, 5 ); slider_sizer->Add( slider, 1, wxGROW | wxALL, 5 );
slider_sizer->Layout(); slider_sizer->Layout();
slider_sizer->SetSizeHints(slider_frame);
} }
/***************************************************************************** /*****************************************************************************
......
/***************************************************************************** /*****************************************************************************
* interface.cpp : wxWindows plugin for vlc * playlist.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $$ * $Id: playlist.cpp,v 1.4 2002/11/23 18:42:59 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* *
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
*- *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -120,12 +120,17 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -120,12 +120,17 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ):
/* Attach the menu bar to the frame */ /* Attach the menu bar to the frame */
SetMenuBar( menubar ); SetMenuBar( menubar );
/* Create a panel to put everything in */
wxPanel *playlist_panel = new wxPanel( this, -1 );
playlist_panel->SetAutoLayout( TRUE );
/* Create the listview */ /* Create the listview */
/* FIXME: the given size is arbitrary, and prevents us from resizing /* FIXME: the given size is arbitrary, and prevents us from resizing
* the window to smaller dimensions. But the sizers don't seem to adjust * the window to smaller dimensions. But the sizers don't seem to adjust
* themselves to the size of a listview, and with a wxDefaultSize the * themselves to the size of a listview, and with a wxDefaultSize the
* playlist window is ridiculously small */ * playlist window is ridiculously small */
listview = new wxListView( this, ListView_Event, wxDefaultPosition, listview = new wxListView( playlist_panel, ListView_Event,
wxDefaultPosition,
wxSize( 350, 300 ), wxLC_REPORT ); wxSize( 350, 300 ), wxLC_REPORT );
listview->InsertColumn( 0, _("Url") ); listview->InsertColumn( 0, _("Url") );
listview->InsertColumn( 1, _("Duration") ); listview->InsertColumn( 1, _("Duration") );
...@@ -133,16 +138,21 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -133,16 +138,21 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ):
listview->SetColumnWidth( 1, 100 ); listview->SetColumnWidth( 1, 100 );
/* Create the OK button */ /* Create the OK button */
ok_button = new wxButton( this, wxID_OK, _("OK") ); ok_button = new wxButton( playlist_panel, wxID_OK, _("OK") );
ok_button->SetDefault(); ok_button->SetDefault();
/* Place everything in sizers */ /* Place everything in sizers */
wxBoxSizer *ok_button_sizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *ok_button_sizer = new wxBoxSizer( wxHORIZONTAL );
ok_button_sizer->Add( ok_button, 0, wxALL, 5 ); ok_button_sizer->Add( ok_button, 0, wxALL, 5 );
ok_button_sizer->Layout();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
main_sizer->Add( listview, 1, wxEXPAND | wxALL, 5 ); wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
main_sizer->Add( ok_button_sizer, 0, wxALIGN_CENTRE ); panel_sizer->Add( listview, 1, wxEXPAND | wxALL, 5 );
panel_sizer->Add( ok_button_sizer, 0, wxALIGN_CENTRE );
panel_sizer->Layout();
playlist_panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( playlist_panel, 1, wxGROW, 0 );
main_sizer->Layout();
SetSizerAndFit( main_sizer ); SetSizerAndFit( main_sizer );
/* Associate drop targets with the playlist */ /* Associate drop targets with the playlist */
......
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