[vlc-devel] [PATCH 4/7] Enabled the Qt4-PictureFlow (fixed bugs when PL/ML was changed)

Jean-Baptiste Kempf jb at videolan.org
Sun Apr 22 22:53:31 CEST 2012


On Sun, Apr 22, 2012 at 10:38:13PM +0200, VlcVelope wrote :
>  mode change 100644 => 100755 modules/gui/qt4/components/playlist/standardpanel.cpp
>  mode change 100644 => 100755 modules/gui/qt4/components/playlist/views.cpp
>  mode change 100644 => 100755 modules/gui/qt4/components/playlist/views.hpp
>  mode change 100644 => 100755 modules/gui/qt4/util/pictureflow.cpp
>  mode change 100644 => 100755 modules/gui/qt4/util/pictureflow.hpp

No.

> 
> diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp
> old mode 100644
> new mode 100755
> index e6ba9e6..a19f4ea
> --- a/modules/gui/qt4/components/playlist/playlist.cpp
> +++ b/modules/gui/qt4/components/playlist/playlist.cpp
> @@ -124,11 +124,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
>  
>      QActionGroup *actionGroup = new QActionGroup( this );
>  
> -#ifndef NDEBUG
>  # define MAX_VIEW StandardPLPanel::VIEW_COUNT
> -#else
> -# define MAX_VIEW StandardPLPanel::VIEW_COUNT - 1
> -#endif

Nothing to do in this patch

> -        if( currentView->model() != model )
> -            currentView->setModel( model );
>          model->rebuild( p_item );
> +        currentView->setModel( model );

Idem

> -        currentView->setRootIndex( index );
>  
>          /* When going toward root in LocationBar, scroll to the item
>             that was previously as root */
> @@ -216,6 +214,7 @@ void StandardPLPanel::browseInto( const QModelIndex &index )
>  
>          /* Store new rootindexid*/
>          currentRootIndexId = model->itemId( index );
> +        currentView->setRootIndex( index );

Why?

> -#ifndef NDEBUG
>          showView( PICTUREFLOW_VIEW  );
>      else if( currentView == picFlowView )
> -#endif

Nothing to do in this patch.


> -    picFlow->setSlideSize(QSize(128,128));
>      layout->addWidget( picFlow );
> +	picFlow->setSlideSize(QSize( 4*LISTVIEW_ART_SIZE, 3*LISTVIEW_ART_SIZE) );

No tabs in source code.

>  PictureFlowState::PictureFlowState():
> -        backgroundColor(0), slideWidth(150), slideHeight(200),
> +        backgroundColor(qRgba(0,0,0,0)), slideWidth(150), slideHeight(120),

What is this change for?

> +			int xw=img.width(),yw=img.height();
> +			QRgb color;
>              for (int y = 0; y < ht; y++) {
> -                QRgb color = img.pixel(x, img.height() - y - 1);
> -                line[h+hofs+y] = blendColor( color, bgcolor, 128*(hte-y)/hte );
> +				color=bg;
> +				int x0=x-(w-xw)/2;
> +				int y0=yw - y - 1+(h-yw)/2;
> +				if(x0>=0 && x0<xw && y0>=0 && y0<yw)
> +                	color = img.pixel(x0, y0);
> +                line[h+hofs+y] = blendColor( color, bg, 128*(hte-y)/hte );

No tabs, please.

> +    d->state->model=(VLCModel*)model;
?

The rest is a good idea, to improve and fix this mode.

Best regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list