**********************************************************************/
BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i )
- :QWidget( NULL ), p_intf( _p_i ), b_expandPixmap( false )
+ :QWidget( NULL ), p_intf( _p_i ), b_expandPixmap( false ), b_withart( true )
{
/* A dark background */
setAutoFillBackground( true );
void BackgroundWidget::paintEvent( QPaintEvent *e )
{
+ if ( !b_withart )
+ {
+ /* we just want background autofill */
+ QWidget::paintEvent( e );
+ return;
+ }
+
int i_maxwidth, i_maxheight;
QPixmap pixmap = QPixmap( pixmapUrl );
QPainter painter(this);
public:
BackgroundWidget( intf_thread_t * );
void setExpandstoHeight( bool b_expand ) { b_expandPixmap = b_expand; }
+ void setWithArt( bool b_withart_ ) { b_withart = b_withart_; };
private:
QString pixmapUrl;
bool b_expandPixmap;
+ bool b_withart;
virtual void contextMenuEvent( QContextMenuEvent *event );
intf_thread_t *p_intf;
protected:
/* Bg Cone */
bgWidget = new BackgroundWidget( p_intf );
stackCentralW->addWidget( bgWidget );
+ if ( !var_InheritBool( p_intf, "qt-bgcone" ) )
+ bgWidget->setWithArt( false );
+ else
+ if ( var_InheritBool( p_intf, "qt-bgcone-expands" ) )
+ bgWidget->setExpandstoHeight( true );
/* And video Outputs */
if( b_videoEmbedded )
#define QT_MINIMAL_MODE_TEXT N_("Start in minimal view (without menus)" )
+#define QT_BGCONE_TEXT N_( "Display background cone or art" )
+#define QT_BGCONE_LONGTEXT N_( "Display background cone or current album art " \
+ "when not playing." \
+ "Can be disabled to prevent burning screen." )
+#define QT_BGCONE_EXPANDS_TEXT N_( "Expanding background cone or art." )
+#define QT_BGCONE_EXPANDS_LONGTEXT N_( "Background art fits window's size" )
/**********************************************************************/
vlc_module_begin ()
set_shortname( "Qt" )
QT_AUTOLOAD_EXTENSIONS_TEXT, QT_AUTOLOAD_EXTENSIONS_LONGTEXT,
false )
+ add_bool( "qt-bgcone", true, QT_BGCONE_TEXT, QT_BGCONE_LONGTEXT, true )
+ add_bool( "qt-bgcone-expands", false, QT_BGCONE_EXPANDS_TEXT,
+ QT_BGCONE_EXPANDS_LONGTEXT, true )
+
add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */
add_obsolete_integer( "qt-display-mode" ) /* Suppressed since 1.1.0 */