[Konsole-devel] [Bug 157882] Set background image in konsole 2.0 (kde4)

Alexandre Becoulet diaxen at free.fr
Sun Jul 3 15:34:22 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=157882





--- Comment #23 from Alexandre Becoulet <diaxen free fr>  2011-07-03 15:34:22 ---
(In reply to comment #22)

Hi,

>  * I suggest ColorSchemeWallpaper::_picture should be a QPixmap instead of a
> QPixmap*

This is what I did at first but ColorSchemeWallpaper is created before
QApplication and the QPixmap can not be constructed then, that's why I choose
to delay the QPixmap creation.

>  * Instead of allocating a special large pixmap to hold the tiled image, you
> could just draw it directly when rendering the image.  This will save a
> noticeable amount of memory when the terminal window is large.  Pre-rendering
> to a pixmap mainly makes sense if you need to apply additional effects or the
> initial rendering is especially expensive relative to the cost of drawing a
> single pixmap.

Drawing a tiled pixmap gave complicated rectangle intersection code in the draw
function and I finally decided to prepare a large pixmap instead, but I just
noticed the QPainter class contains some drawTiledPixmap functions which seem
to do just what we need.

>  * The coding standard in Konsole is for & and * to bind to the type rather
> than the name ('QString&' instead of 'QString &foo')

Ok

>  * ColorSchemeWallpaper::path() should return a plain QString rather than a
> const ref, in keeping with most of the Qt APIs

Ok

I'll submit a new patch soon.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list