Review Request: rounded borders to dialogs

Aaron Seigo aseigo at kde.org
Wed Mar 5 21:45:43 CET 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://mattr.info/r/258/#review244
-----------------------------------------------------------

Ship it!


other than the caching issue, this looks rather nice imho.

a word about this should also be dropped in the Theme documentation here:

http://techbase.kde.org/Projects/Plasma/Theme#Backgroundsheme#Backgrounds



/trunk/KDE/kdebase/workspace/libs/plasma/svgpanel.cpp
<http://mattr.info/r/258/#comment183>

    i wonder if we need to cache the mask. it's set only on creation and subsequent resizes ... it's a question of memory usage vs speed, really; given that it's pixmap manipulation (grabbing the alphachannel, creating a mask from it) and not the rather more expensive task of svg rendering, do you think we could get away with the performance drag of re-creating the mask?
    
    personally i think resizes are likely to be rare enough in practice that we can afford to do that.
    
    thinking about it more: a resize will trigger a re-rendering  anyways, so this doesn't save any processing anyways. so there doesn't seem to be any advantage to caching it that i can see? 


- Aaron


On 2008-03-05 14:20:56, Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://mattr.info/r/258/
> -----------------------------------------------------------
> 
> (Updated 2008-03-05 14:20:56)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> revision 2:
> this version is quite different from the previous one.
> now svgpanel has a new mask() function that returns a qbitmap of the areas of the svg with alpha=0 that can be used to create the mask of the window, at the moment used in tooltip and dialog.
> since it excludes only totally transparent areas it doesn't interfere with semi-transparent areas when composite is on.
> there are also two (identical) svgs for opaque tooltips and dialogs with pixelated rounded borders and unlike the previous version they are vector based now.
> 
> revision 1:
> This patch makes rounded borders to dialogs when compositing is not active just like the tooltips.
> -since the check if compositing is active is done in many places i added it to Plasma::Theme since it was already keeping track of it (does this makes sense?)
> -tooltips had a rounded borders radius hardcoded of 10px, i made a new svg element (and consequent access functions in svgpanel) hint-round-radius to retrieve the size for pixmap based svgs it must be something like an external square, for vector based it could be an element inner to for instance the topleft corner id
> -krunner is still missing, i've not touched it atm since is in the process of becoming "good enough for aaron"(tm) :P
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/workspace/plasma/desktoptheme/opaque/dialogs/background.svg
>   /trunk/KDE/kdebase/workspace/libs/plasma/theme.h
>   /trunk/KDE/kdebase/workspace/libs/plasma/theme.cpp
>   /trunk/KDE/kdebase/workspace/libs/plasma/widgets/tooltip.cpp
>   /trunk/KDE/kdebase/workspace/libs/plasma/dialog.cpp
>   /trunk/KDE/kdebase/workspace/libs/plasma/svgpanel.h
>   /trunk/KDE/kdebase/workspace/libs/plasma/svgpanel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/desktoptheme/opaque/widgets/tooltip.svg
> 
> Diff: http://mattr.info/r/258/diff
> 
> 
> Testing
> -------
> 
> tested tooltips and some dialogs also with svg that don't have the hint-round-radius element: they simply become squared
> 
> 
> Thanks,
> 
> Marco
> 
>



More information about the Panel-devel mailing list