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

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