FrameSVG manual reload on themeChanged()

Aaron J. Seigo aseigo at kde.org
Thu Feb 9 14:26:44 UTC 2012


On Thursday, February 9, 2012 17:11:38 Ignat Semenov wrote:
> Hello fellow plasma developers!
> 
> I'm doing a fix for folderview, related to the theme changes.  In
> particular, I need to relayout and repaint the items using the margins
> in the new viewitem.svgz in the new theme. To reload the FrameSVG
> object manually, I need to do an update() call in the applet, which
> will redraw everything, including the view, and load the correct SVG.
> But, after that, I will recalculate the correct margins and relayout
> the items (as they have different sizes now), and then repaint the
> view completely. So we have 2 complete repaints (and one more in
> AppletPrivate::themeChanged(), an unconditional one.)
> 
> So, I'd like to avoid this second repaint (via update()), and reload
> the framesvg manually. How can I do that?

are you sure this results in 2 paint events? in theory, these signals should 
all happen at the same time and those two calls to update() should be 
compressed into a single paint event .. meaning that there is no point in 
trying to optimize that call out.

that's the theory .. in practice that theory could be wrong (in which case we 
need to fix it in libplasma). if you could confirm the number of paint events 
that actually get triggered that would be excellent.

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120209/75950f64/attachment.sig>


More information about the Plasma-devel mailing list