Review Request: fixes thumbnails of KoPADocuments to be without empty spaces around (Flow, Stage)

Friedrich W. H. Kossebau kossebau at kde.org
Sat Jun 30 17:08:17 BST 2012



> On June 30, 2012, 5:34 a.m., Thorsten Zachmann wrote:
> > libs/kopageapp/KoPAPageBase.cpp, lines 344-351
> > <http://git.reviewboard.kde.org/r/105390/diff/1/?file=70655#file70655line344>
> >
> >     I don't like using a qpixmap and then converting it to a qimage. Using a QPixmap in this case is a bas idea as it gives worse results and is not threadsave. 
> >     
> >     How about refactoring the code to pass the painter to the painting and one function to get the zoom handler?

Seems implications of QImage vs. QPixmap was not in my mind when cutting the code. But I do not really understand your refactoring proposal: one function to get the zoom handler? Where should that be added?

I dropped an idea to create a AbstractThumbCreationTemplate class or similar to not overengineer and instead returned to have a little code duplication in both function, see upcoming update. Proposals to reduce the duplication left still welcome :)


- Friedrich W. H.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105390/#review15261
-----------------------------------------------------------


On June 29, 2012, 9:25 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105390/
> -----------------------------------------------------------
> 
> (Updated June 29, 2012, 9:25 p.m.)
> 
> 
> Review request for Calligra, Yue Liu and Thorsten Zachmann.
> 
> 
> Description
> -------
> 
> Currently the size of the thumbnails is not adapted to the format of the page, instead the icon contains empty white space on the sides if the page is not square. That results in bad previews in the filesystem browsers.
> 
> The patch fixes that by calculating the size of the preview image to just match the rendered area.
>     
> It also reduces code duplication by moving the identic implementations of thumbImage(...) and generateThumbnail(...) to the base class.
> And removes the unused and never-defined method createPageThumbnail() from KPrNotes.
> 
> 
> Diffs
> -----
> 
>   libs/kopageapp/KoPAMasterPage.h 9852973 
>   libs/kopageapp/KoPAMasterPage.cpp 42e9065 
>   libs/kopageapp/KoPAPage.h 6a81b04 
>   libs/kopageapp/KoPAPage.cpp cd9c5f4 
>   libs/kopageapp/KoPAPageBase.h b9a5961 
>   libs/kopageapp/KoPAPageBase.cpp cd25030 
>   stage/part/KPrNotes.h 28ee984 
> 
> Diff: http://git.reviewboard.kde.org/r/105390/diff/
> 
> 
> Testing
> -------
> 
> Cleared the thumbnail cache in ~/.thumbnails and enjoyed better thumbnails after the patch :) E.g. when browsing the templates.
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120630/b4dcaef5/attachment.htm>


More information about the calligra-devel mailing list