QToolButton *prevSectionButton = new QToolButton( discFrame );
setupButton( prevSectionButton );
- BUTTON_SET_BAR2( prevSectionButton, dvd_prev,
+ BUTTON_SET_BAR2( prevSectionButton, toolbar/dvd_prev,
qtr("Previous Chapter/Title" ) );
discLayout->addWidget( prevSectionButton );
QToolButton *menuButton = new QToolButton( discFrame );
setupButton( menuButton );
discLayout->addWidget( menuButton );
- BUTTON_SET_BAR2( menuButton, dvd_menu, qtr( "Menu" ) );
+ BUTTON_SET_BAR2( menuButton, toolbar/dvd_menu, qtr( "Menu" ) );
QToolButton *nextSectionButton = new QToolButton( discFrame );
setupButton( nextSectionButton );
discLayout->addWidget( nextSectionButton );
- BUTTON_SET_BAR2( nextSectionButton, dvd_next,
+ BUTTON_SET_BAR2( nextSectionButton, toolbar/dvd_next,
qtr("Next Chapter/Title" ) );
/* Change the navigation button display when the IM
/* On/Off button */
QToolButton *telexOn = new QToolButton;
setupButton( telexOn );
- BUTTON_SET_BAR2( telexOn, tv, qtr( "Teletext Activation" ) );
+ BUTTON_SET_BAR2( telexOn, toolbar/tv, qtr( "Teletext Activation" ) );
telexOn->setEnabled( false );
telexOn->setCheckable( true );
/* Transparency button */
QToolButton *telexTransparent = new QToolButton;
setupButton( telexTransparent );
- BUTTON_SET_BAR2( telexTransparent, tvtelx,
+ BUTTON_SET_BAR2( telexTransparent, toolbar/tvtelx,
qtr( "Toggle Transparency " ) );
telexTransparent->setEnabled( false );
telexTransparent->setCheckable( true );
#undef SET_MAPPING
#undef CONNECT_MAP_SET
#undef BUTTON_SET_BAR
+#undef BUTTON_SET_BAR2
#undef ENABLE_ON_VIDEO
#undef ENABLE_ON_INPUT
/**********************************************************************
* Fullscrenn control widget
**********************************************************************/
-FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
- : AbstractController( _p_i )
+FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWidget *_parent )
+ : AbstractController( _p_i, _parent )
{
i_mouse_last_x = -1;
i_mouse_last_y = -1;
setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
QVBoxLayout *controlLayout2 = new QVBoxLayout( this );
- controlLayout2->setLayoutMargins( 5, 2, 5, 2, 5 );
+ controlLayout2->setLayoutMargins( 4, 6, 4, 2, 5 );
/* First line */
InputControlsWidget *inputC = new InputControlsWidget( p_intf, this );
CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() );
#endif
- adjustSize (); /* need to get real width and height for moving */
-
-#ifdef WIN32TRICK
- setWindowOpacity( 0.0 );
- b_fscHidden = true;
- adjustSize();
- show();
-#endif
-
vlc_mutex_init_recursive( &lock );
CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ),
void FullscreenControllerWidget::centerFSC( int number )
{
screenRes = QApplication::desktop()->screenGeometry(number);
+
/* screen has changed, calculate new position */
- QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (width() / 2),
- screenRes.y() + screenRes.height() - height());
+ QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (sizeHint().width() / 2),
+ screenRes.y() + screenRes.height() - sizeHint().height());
move( pos );
+
i_screennumber = number;
}
screenRes != QApplication::desktop()->screenGeometry(number) )
{
centerFSC( number );
+ msg_Dbg( p_intf, "Recentering the Fullscreen Controller" );
}
-#ifdef WIN32TRICK
- // after quiting and going to fs, we need to call show()
- if( isHidden() )
- show();
- if( b_fscHidden )
- {
- b_fscHidden = false;
- setWindowOpacity( 1.0 );
- }
-#else
- show();
-#endif
#if HAVE_TRANSPARENCY
setWindowOpacity( DEFAULT_OPACITY );
#endif
-}
-/**
- * Hide fullscreen controller
- * FIXME: under windows it have to be done by moving out of screen
- * because hide() doesnt work
- */
-void FullscreenControllerWidget::hideFSC()
-{
-#ifdef WIN32TRICK
- b_fscHidden = true;
- setWindowOpacity( 0.0 ); // simulate hidding
-#else
- hide();
-#endif
+ show();
}
/**
}
else
{
-#ifdef WIN32TRICK
- if ( windowOpacity() > 0.0 && !b_fscHidden )
-#else
if ( windowOpacity() > 0.0 )
-#endif
{
/* we should use 0.01 because of 100 pieces ^^^
but than it cannt be done in time */
switch( event->type() )
{
+ /* This is used when the 'i' hotkey is used, to force quick toggle */
case FullscreenControlToggle_Type:
vlc_mutex_lock( &lock );
b_fs = b_fullscreen;
vlc_mutex_unlock( &lock );
+
if( b_fs )
{
-#ifdef WIN32TRICK
- if( b_fscHidden )
-#else
if( isHidden() )
-#endif
{
p_hideTimer->stop();
showFSC();
hideFSC();
}
break;
+ /* Event called to Show the FSC on mouseChanged() */
case FullscreenControlShow_Type:
vlc_mutex_lock( &lock );
b_fs = b_fullscreen;
vlc_mutex_unlock( &lock );
-#ifdef WIN32TRICK
- if( b_fs && b_fscHidden )
-#else
- if( b_fs && !isVisible() )
-#endif
+ if( b_fs )
showFSC();
+
break;
- case FullscreenControlHide_Type:
- hideFSC();
- break;
+ /* Start the timer to hide later, called usually with above case */
case FullscreenControlPlanHide_Type:
if( !b_mouse_over ) // Only if the mouse is not over FSC
planHideFSC();
break;
+ /* Hide */
+ case FullscreenControlHide_Type:
+ hideFSC();
+ break;
default:
break;
}
{
i_mouse_last_x = event->globalX();
i_mouse_last_y = event->globalY();
+ event->accept();
}
void FullscreenControllerWidget::mouseReleaseEvent( QMouseEvent *event )
{
i_mouse_last_x = -1;
i_mouse_last_y = -1;
+ event->accept();
}
/**
p_hideTimer->stop();
#if HAVE_TRANSPARENCY
p_slowHideTimer->stop();
+ setWindowOpacity( DEFAULT_OPACITY );
#endif
event->accept();
}