Fixing is not everything

I have just committed a speed fix for KFadeWidgetEffect. We do use very often the method setOpacity() which results to be really slow on current QPainter (we really hope this will be fixed on new versions of Qt). You can read this techbase tutorial, written by Fredrik Höglund, you will learn a lot about the dark side of QPainter, and how to avoid the more general cases that we usually face.

I opposed of adding this fade in / fade out effect to page dialogs when this class was introduced because when the screen was maximized the performance was plain painful. Now that this code from KFileItemDelegate has been borrowed by KFadeWidgetEffect we can do fast blending, and I made the page dialogs blend their pages.

The resulting video is the next one.

PS: This is not in KDE 4.1.

PS2: It will be possible to disable this effect from the style (probably) KCM from SystemSettings.

About ereslibre

Free Software developer and enthusiast. Architect/Developer. Researcher at Complutense University. Web developer. C, C++, PHP, Ruby, Javascript, JQuery, Qt, KDE expert. Rails hacker on the works.
This entry was posted in KDE Development. Bookmark the permalink.
  • someoddguy

    > PS2: It will be possible to disable this effect from the style (probably) KCM from SystemSettings.

    This is the most important comment in this blog entry. Thanks.

  • Mark Kretschmann

    Great work, ereslibre. I’ve always liked this effect, and seeing it now scale to bigger sizes is really useful :)

  • Jos

    Thanks a lot for the pointer to that tutorial, Rafael. I’ve been a careless QPainter::setOpacity() user, because I was unaware of the consequences. I’ve also been exchanging QPixmap and QImage way too much. The clear explanation in the tutorial will help me remember to avoid doing this.

  • http://www.madsheytan.blogspot.com Sheytan

    Great! It’s a little to slow for me, but it’s cool :D I rly want to see it in Dolphin when changing the folders :D

  • Aaron Seigo

    I agree with Sheytan that it’s just a *touch* too long; not much, though. The speed improvement is terrific though. I really liked the blend change, it was just tooo slow. =)

    @someoddguy: it’s might also be of interest to know that Plasma also follows this same setting =)