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

* modules/gui/wxwindows/interface.cpp: another fix for the embedded video size.

parent 71954776
...@@ -692,27 +692,23 @@ void Interface::ShowSlider( bool show, bool layout ) ...@@ -692,27 +692,23 @@ void Interface::ShowSlider( bool show, bool layout )
//prevent continuous layout //prevent continuous layout
if( slider_frame->IsShown() ) return; if( slider_frame->IsShown() ) return;
slider_frame->Show();
frame_sizer->Show( slider_frame );
} }
else else
{ {
//prevent continuous layout //prevent continuous layout
if( !slider_frame->IsShown() ) return; if( !slider_frame->IsShown() ) return;
slider_frame->Hide();
frame_sizer->Hide( slider_frame );
} }
if( layout && p_intf->p_sys->b_video_autosize )
UpdateVideoWindow( p_intf, video_window );
slider_frame->Show( show );
frame_sizer->Show( slider_frame, show );
if( layout ) if( layout )
{ {
frame_sizer->Layout(); frame_sizer->Layout();
if( p_intf->p_sys->b_video_autosize ) if( p_intf->p_sys->b_video_autosize ) frame_sizer->Fit( this );
{
UpdateVideoWindow( p_intf, video_window );
frame_sizer->Fit( this );
}
} }
} }
...@@ -730,28 +726,25 @@ void Interface::ShowDiscFrame( bool show, bool layout ) ...@@ -730,28 +726,25 @@ void Interface::ShowDiscFrame( bool show, bool layout )
//prevent continuous layout //prevent continuous layout
if( disc_frame->IsShown() ) return; if( disc_frame->IsShown() ) return;
disc_frame->Show();
slider_sizer->Show( disc_frame );
} }
else else
{ {
//prevent continuous layout //prevent continuous layout
if( !disc_frame->IsShown() ) return; if( !disc_frame->IsShown() ) return;
disc_frame->Hide();
slider_sizer->Hide( disc_frame );
} }
if( layout && p_intf->p_sys->b_video_autosize )
UpdateVideoWindow( p_intf, video_window );
disc_frame->Show( show );
slider_sizer->Show( disc_frame, show );
if( layout ) if( layout )
{ {
slider_sizer->Layout(); slider_sizer->Layout();
if( p_intf->p_sys->b_video_autosize ) if( p_intf->p_sys->b_video_autosize )
{
UpdateVideoWindow( p_intf, video_window );
slider_sizer->Fit( slider_frame ); slider_sizer->Fit( slider_frame );
} }
}
} }
/***************************************************************************** /*****************************************************************************
...@@ -759,6 +752,9 @@ void Interface::ShowDiscFrame( bool show, bool layout ) ...@@ -759,6 +752,9 @@ void Interface::ShowDiscFrame( bool show, bool layout )
*****************************************************************************/ *****************************************************************************/
void Interface::OnControlsTimer( wxTimerEvent& WXUNUSED(event) ) void Interface::OnControlsTimer( wxTimerEvent& WXUNUSED(event) )
{ {
if( p_intf->p_sys->b_video_autosize )
UpdateVideoWindow( p_intf, video_window );
/* Hide slider and Disc Buttons */ /* Hide slider and Disc Buttons */
//postpone layout, we'll do it ourselves //postpone layout, we'll do it ourselves
HideDiscFrame( false ); HideDiscFrame( false );
...@@ -768,7 +764,6 @@ void Interface::OnControlsTimer( wxTimerEvent& WXUNUSED(event) ) ...@@ -768,7 +764,6 @@ void Interface::OnControlsTimer( wxTimerEvent& WXUNUSED(event) )
if( p_intf->p_sys->b_video_autosize ) if( p_intf->p_sys->b_video_autosize )
{ {
slider_sizer->Fit( slider_frame ); slider_sizer->Fit( slider_frame );
UpdateVideoWindow( p_intf, video_window );
frame_sizer->Fit( this ); frame_sizer->Fit( this );
} }
} }
......
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