[vlc-devel] [PATCH 4/7] Enabled the Qt4-PictureFlow (fixed bugs when PL/ML was changed)
VlcVelope
1034-135 at online.de
Mon Apr 23 23:58:04 CEST 2012
On 22.04.2012 22:53, Jean-Baptiste Kempf wrote:
> 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.
What do you mean with "No."? I am starting to use git right now and I do
not understand.
>
>>
>> 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
You mean the #ifndef will stay for some time?
>
>> - if( currentView->model() != model )
>> - currentView->setModel( model );
>> model->rebuild( p_item );
>> + currentView->setModel( model );
>
> Idem
When I was working on that, PictureFlow was crashing if the model was
not ready set. So I rebuilt the model before setting it (for any view)
>
>> - 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?
I think it was an issue when you change from PL to ML during playback
the selection in the view was wrong. I will check this.
>
>> -#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?
Well, qRgba translates to 0, and the width/height I thought most art
will be more 4:3 (in this case 5:4) than 3:4. The real size is set by
the mis-tabbed statement above.
>
>> + 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;
> ?
PictureFlowState::model is of VLCModel*.
>
> The rest is a good idea, to improve and fix this mode.
>
> Best regards,
>
Regards,
VlcVelope
More information about the vlc-devel
mailing list