#include <QSignalMapper>
#include <QTimer>
+//#define DEBUG_LAYOUT 1
+
/**********************************************************************
* TEH controls
**********************************************************************/
/* Special case for SPACERS, who aren't QWidgets */
if( i_type == WIDGET_SPACER )
{
- controlLayout->insertSpacing( i_index, 16 );
+ controlLayout->insertSpacing( i_index, 12 );
return;
}
if( i_type == WIDGET_SPACER_EXTEND )
{
- controlLayout->insertStretch( i_index, 16 );
+ controlLayout->insertStretch( i_index, 12 );
return;
}
InputSlider *slider = new InputSlider( Qt::Horizontal, NULL );
/* Update the position when the IM has changed */
- CONNECT( THEMIM->getIM(), positionUpdated( float, int, int ),
- slider, setPosition( float, int, int ) );
+ CONNECT( THEMIM->getIM(), positionUpdated( float, int64_t, int ),
+ slider, setPosition( float, int64_t, int ) );
/* And update the IM, when the position has changed */
CONNECT( slider, sliderDragged( float ),
THEMIM->getIM(), sliderUpdate( float ) );
case RANDOM_BUTTON: {
NORMAL_BUTTON( RANDOM );
RANDOMButton->setCheckable( true );
+ RANDOMButton->setChecked( var_GetBool( THEPL, "random" ) );
CONNECT( THEMIM, randomChanged( bool ),
RANDOMButton, setChecked( bool ) );
}
widget = loopButton;
}
break;
+ case INFO_BUTTON: {
+ NORMAL_BUTTON( INFO );
+ }
+ break;
default:
msg_Warn( p_intf, "This should not happen %i", button );
break;
/**
* Telextext QFrame
**/
- QFrame *telexFrame = new QFrame;
+ QFrame *telexFrame = new QFrame( this );
QHBoxLayout *telexLayout = new QHBoxLayout( telexFrame );
telexLayout->setSpacing( 0 ); telexLayout->setMargin( 0 );
CONNECT( THEMIM->getIM(), teletextPossible( bool ),
{
/* advanced Controls handling */
b_advancedVisible = b_advControls;
+#if DEBUG_LAYOUT
+ setStyleSheet( " background: red ");
+#endif
QVBoxLayout *controlLayout = new QVBoxLayout( this );
- controlLayout->setLayoutMargins( 6, 4, 6, 2, 5 );
+ controlLayout->setContentsMargins( 4, 1, 4, 0 );
controlLayout->setSpacing( 0 );
QHBoxLayout *controlLayout1 = new QHBoxLayout;
- controlLayout1->setSpacing( 0 );
+ controlLayout1->setSpacing( 0 ); controlLayout1->setMargin( 0 );
QString line1 = getSettings()->value( "MainToolbar1", MAIN_TB1_DEFAULT )
.toString();
parseAndCreate( line1, controlLayout1 );
QHBoxLayout *controlLayout2 = new QHBoxLayout;
- controlLayout2->setSpacing( 0 );
+ controlLayout2->setSpacing( 0 ); controlLayout2->setMargin( 0 );
QString line2 = getSettings()->value( "MainToolbar2", MAIN_TB2_DEFAULT )
.toString();
parseAndCreate( line2, controlLayout2 );
controlLayout = new QHBoxLayout( this );
controlLayout->setMargin( 0 );
controlLayout->setSpacing( 0 );
+#if DEBUG_LAYOUT
+ setStyleSheet( " background: orange ");
+#endif
+
QString line = getSettings()->value( "AdvToolbar", ADV_TB_DEFAULT )
.toString();
controlLayout = new QHBoxLayout( this );
controlLayout->setMargin( 0 );
controlLayout->setSpacing( 0 );
+#if DEBUG_LAYOUT
+ setStyleSheet( " background: green ");
+#endif
QString line = getSettings()->value( "InputToolbar", INPT_TB_DEFAULT ).toString();
parseAndCreate( line, controlLayout );
setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
QVBoxLayout *controlLayout2 = new QVBoxLayout( this );
- controlLayout2->setLayoutMargins( 4, 6, 4, 2, 5 );
+ controlLayout2->setContentsMargins( 4, 6, 4, 2 );
/* First line */
InputControlsWidget *inputC = new InputControlsWidget( p_intf, this );
/* First Move */
QRect rect1 = getSettings()->value( "FullScreen/screen" ).toRect();
QPoint pos1 = getSettings()->value( "FullScreen/pos" ).toPoint();
- int number = config_GetInt( p_intf, "qt-fullscreen-screennumber" );
+ int number = var_InheritInteger( p_intf, "qt-fullscreen-screennumber" );
if( number == -1 || number > QApplication::desktop()->numScreens() )
number = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
}
#if HAVE_TRANSPARENCY
- setWindowOpacity( config_GetFloat( p_intf, "qt-fs-opacity" ) );
+ setWindowOpacity( var_InheritFloat( p_intf, "qt-fs-opacity" ) );
#endif
show();