Commit Graph

59 Commits

Author SHA1 Message Date
Marco Martin
ade5dd1ae7 revert behavioural change in framesvg, repaint glithches--
svn path=/trunk/KDE/kdelibs/; revision=1216286
2011-01-22 13:05:34 +00:00
Marco Martin
ef683f5eac if the second QRect paramenter of paintFrame is empty, take the whole pixmap rect: this is what was supposed to happen in the first place
svn path=/trunk/KDE/kdelibs/; revision=1216114
2011-01-21 13:18:00 +00:00
Marco Martin
becf979cf4 don't actually delete the frame: we want to discard the pixmap, but not the frame size or the enabledborders
svn path=/trunk/KDE/kdelibs/; revision=1215933
2011-01-20 11:23:56 +00:00
Marco Martin
714578ecc3 * don't try to generate backgrounds when the prefix is not present in framesvg
* use the correct currentPixmap (vs m_currentpixmap) in pixmaptransition.
those two fix the focus rect hover animation

svn path=/trunk/KDE/kdelibs/; revision=1192741
2010-11-03 21:55:50 +00:00
Aaron J. Seigo
d999c34c31 fd is 0 by this point
svn path=/trunk/KDE/kdelibs/; revision=1185878
2010-10-14 13:04:28 +00:00
Aaron J. Seigo
4495dc2eff handle the caching case in setImagePath properly; this is a significant increase in complexity in this rather fundamental method. in combination with the change in Svg::setImagePath to call FrameSvg::setImagePath directly (due to an API wart i only today noticed), this has the potential to cause new issues, though it is running quite nicely on my system. needs extensive testing, but should also hopefully take care of the remaining crash being seen related to the FrameData cache
CCMAIL:plasma-devel@kde.org

svn path=/trunk/KDE/kdelibs/; revision=1185856
2010-10-14 12:09:23 +00:00
Aaron J. Seigo
e38c0abb97 it's a set of flags, so we do need the full value as a string. meh.
svn path=/trunk/KDE/kdelibs/; revision=1185506
2010-10-13 14:40:41 +00:00
Aaron J. Seigo
a92f14160d faster
svn path=/trunk/KDE/kdelibs/; revision=1185501
2010-10-13 14:27:08 +00:00
Marco Martin
2f468e0167 don't try to resize if there is no image
svn path=/trunk/KDE/kdelibs/; revision=1184930
2010-10-11 21:08:38 +00:00
Marco Martin
86a15c25a0 consider the enabled borders in the cacheid.
detach from the shared pool if necessary when the enabled borders change, just as with the size.
fixes soe glitches in dialogs and the notifications animation

svn path=/trunk/KDE/kdelibs/; revision=1184283
2010-10-09 18:07:17 +00:00
Marco Martin
906691e7ce if we are resizing the mask, ensure the key gets changed from the static hash accordingly
svn path=/trunk/KDE/kdelibs/; revision=1182843
2010-10-05 19:26:00 +00:00
Aaron J. Seigo
4160e73393 IMPROVEMENT: share FrameData between FrameSvg objects wherever possible; limits pixmap usage
svn path=/trunk/KDE/kdelibs/; revision=1180317
2010-09-27 17:19:06 +00:00
Jacopo De Simoi
1cef7c2a8d Implement mask caching for a number of different sizes.
The number of cached masks is now capped in a rather brutal way, in practice it should work
well for most cases. 

svn path=/trunk/KDE/kdelibs/; revision=1159649
2010-08-05 21:15:18 +00:00
Marco Martin
a918cc5af7 check if d->frames is empty
BUG:235851

svn path=/trunk/KDE/kdelibs/; revision=1126216
2010-05-13 10:08:44 +00:00
Marco Martin
aa33e4ade0 a new hint: hint-compose-over-border
the centr element will be rendered as big as the image, cropped with the alpha mask and the borderssuperimposed over it.
slightly slower but it's the only way to have radial gradients in the center element and have them rendered in a correct way

svn path=/trunk/KDE/kdelibs/; revision=1123651
2010-05-06 14:16:03 +00:00
Marco Martin
5d5aa2d545 drop the maskType nonsense, only one mask makes sense in the framesvg
svn path=/trunk/KDE/kdelibs/; revision=1099661
2010-03-05 22:37:44 +00:00
Aaron J. Seigo
c2cda2375a this looks like what it was meant to be doing, but perhaps there's some odd sg theme thing at play here? Marco, can you check this? thanks
CCMAIL:notmart@gmail.com

svn path=/trunk/KDE/kdelibs/; revision=1069238
2010-01-03 01:49:00 +00:00
Aurélien Gâteau
2ec6326d77 Do not allow backgrounds whose width or height is more than 100000 pixels
svn path=/trunk/KDE/kdelibs/; revision=1065178
2009-12-22 17:28:22 +00:00
Marco Martin
8f5f218470 unbreak overlay bottom and right positioning
svn path=/trunk/KDE/kdelibs/; revision=1062106
2009-12-13 20:13:55 +00:00
Marco Martin
861fbc9538 hint-overlay-pos-right and hint-overlay-pos-bottom
svn path=/trunk/KDE/kdelibs/; revision=1054731
2009-11-26 16:28:06 +00:00
Aaron J. Seigo
2cd3295e69 d->prefix is always guaranteed to be in d->frames
svn path=/trunk/KDE/kdelibs/; revision=1044540
2009-11-04 00:12:59 +00:00
Darío Andrés Rodríguez
59296fb520 - Fix several minor issues reported by Krazy2
(http://reviewboard.kde.org/r/1837/)


svn path=/trunk/KDE/kdelibs/; revision=1034756
2009-10-13 12:40:13 +00:00
Marco Martin
d7021b22c2 unbreak the overlay mask prefix name
svn path=/trunk/KDE/kdelibs/; revision=1033730
2009-10-10 21:51:53 +00:00
Marco Martin
75b7874569 use a frame called mask-overlay if available for the mask used for
overlay: it can be independent from the window opacity mask

svn path=/trunk/KDE/kdelibs/; revision=1033726
2009-10-10 21:34:51 +00:00
Aaron J. Seigo
326a6a4b18 proper caching, and only caching when we need to
svn path=/trunk/KDE/kdelibs/; revision=1029074
2009-09-28 21:54:00 +00:00
Aaron J. Seigo
79a826e17c don't hang on to the overlay in FrameSvg, rely on the pixmap cache for that
svn path=/trunk/KDE/kdelibs/; revision=1029052
2009-09-28 21:02:24 +00:00
Marco Martin
90d2021f8c actually do something with the cached overlays, instead of using them
just to waste cycles

svn path=/trunk/KDE/kdelibs/; revision=1007004
2009-08-04 21:19:20 +00:00
Marco Martin
2a7747c584 use base 16, should be slightly faster
svn path=/trunk/KDE/kdelibs/; revision=1000133
2009-07-20 21:48:28 +00:00
Marco Martin
627b939e12 fix build with int -> qint64
svn path=/trunk/KDE/kdelibs/; revision=1000123
2009-07-20 21:24:12 +00:00
Marco Martin
94f3c6a498 fix a performance issue: add a new insertintocache function, the new
parameter is used to identify pixmaps that shouldn't be inserted in the
pixmap cache on disk

BUG: 200313

svn path=/trunk/KDE/kdelibs/; revision=1000100
2009-07-20 20:30:07 +00:00
Aaron J. Seigo
02b754a5fc try to compensate for people not calling setFrameSize before using it; instead, default to the size() of the svg when that happens
svn path=/trunk/KDE/kdelibs/; revision=979880
2009-06-10 17:11:02 +00:00
Aaron J. Seigo
9e50b9b61e * use the to-disk-cache-delay in Theme rather than do it per-FrameSvg object
* be a bit more careful to use value() instead of [] in places as we sometimes check the hash for existence of an entry, and [] creates an entry while value() is more kind in that way

svn path=/trunk/KDE/kdelibs/; revision=975773
2009-05-31 05:38:42 +00:00
Marco Martin
d935435085 take overlay position into account into the cache key
svn path=/trunk/KDE/kdelibs/; revision=970932
2009-05-21 12:46:19 +00:00
Marco Martin
d57dd818e4 generate the proper key for the cache
BUG: 193245

svn path=/trunk/KDE/kdelibs/; revision=970150
2009-05-19 17:20:20 +00:00
Aaron J. Seigo
081e120ff7 fix up this loop
svn path=/trunk/KDE/kdelibs/; revision=967643
2009-05-13 16:48:18 +00:00
Aaron J. Seigo
7ac1ba7ee1 obey using cache, and clear the saved frames after we've put them in the cache
svn path=/trunk/KDE/kdelibs/; revision=967636
2009-05-13 16:37:13 +00:00
Aaron J. Seigo
ec65d08748 SVN_SILENT: random ws improvements made while debugging various issues
svn path=/trunk/KDE/kdelibs/; revision=966511
2009-05-11 09:32:19 +00:00
Aaron J. Seigo
03ee0a6839 revert these changes as they go violate a number of design principles; this has been patiently explained a number of times now.
svn path=/trunk/KDE/kdelibs/; revision=962172
2009-05-01 16:28:10 +00:00
David Nolden
42172d0178 Achieve the additional background painting without adding any public API
svn path=/trunk/KDE/kdelibs/; revision=962014
2009-05-01 12:17:04 +00:00
David Nolden
347c0caac4 - Allow painting a background color, or a background pattern behind freely floating elements of the theme, to provide a better fallback mechanism for transparent themes when composition is not available.
The color/pattern is given through the configuration file, and updating due to changes of the configuration file works perfectly. A simple user-interface to use this will be added to the panel configuration.
If you want to try this out, put into the [Theme] section of your plasmarc file:
frameBackgroundColor=#aacc00 (Your picked color)
frameBackgroundColorAlpha=120 (Alpha value for the color, between 0 and 255, 0=invisible, 255=opaque)
frameBackgroundPattern=/path/to/image
frameBackgroundPatternAlpha=255 (Alpha value for the pattern, as above)

The color is painted first, then the pattern. They are painted into the mask defined by the theme, so this only works nicely with themes that supply proper masks.


svn path=/trunk/KDE/kdelibs/; revision=961915
2009-05-01 00:41:41 +00:00
Marco Martin
5f49bb2333 fix the borders calculation when the top border doesn't exists
svn path=/trunk/KDE/kdelibs/; revision=938414
2009-03-11 20:11:31 +00:00
Marco Martin
a82716d835 take the right sizes of the margin hints
svn path=/trunk/KDE/kdelibs/; revision=931029
2009-02-24 16:47:51 +00:00
Marco Martin
b2c950d01e SVN_SILENT: remove stupid debug output
svn path=/trunk/KDE/kdelibs/; revision=930053
2009-02-22 15:52:03 +00:00
Marco Martin
0a60f4c5d2 better support for tiled overlays
svn path=/trunk/KDE/kdelibs/; revision=928085
2009-02-18 21:35:23 +00:00
Alessandro Diaferia
2cc63a17e7 what about constifying constifyable
svn path=/trunk/KDE/kdelibs/; revision=923307
2009-02-08 15:20:00 +00:00
Marco Martin
99d3b2d603 save to normal QSize, hopefully would make easier to fix rendering
problems 

svn path=/trunk/KDE/kdelibs/; revision=922930
2009-02-07 20:44:08 +00:00
Marco Martin
1755bfa667 kill a bit of old dead code
svn path=/trunk/KDE/kdelibs/; revision=922905
2009-02-07 19:05:43 +00:00
Marco Martin
831f2564d8 quite mega-patch:
add a new function FrameSvg::alphaMask() that lets define an alpha-layer
for the frame, that can be the frame itself or a mask- prefix
allow for overlay elements on frames that can do a nice
filigrane-effect, they can either be:
-fixed position at 0,0
-random position consistent across plasma runs (only supported for applet
backgrounds)
-tiled
-scaled

svn path=/trunk/KDE/kdelibs/; revision=910655
2009-01-13 21:46:07 +00:00
Alex Merry
13116aaea9 Don't crash on weirdly invalid SVGs.
The particular problem I was having was that frame->leftWidth was 0 and leftHeight was 0, but
frame->rightWidth was > 0.  And, while trying to paint a 0x0 pixmap is apparently fine
(because QPixmap::isNull() is just (QPixmap::width() == 0)),
QPainter::drawTiledPixmap() tries to do 0 % 0 if you pass it an 8x0 pixmap (which is an
arithmetic error).

And this was happening in KSMServer when displaying the shutdown dialog.
Cue weird behaviour when trying to log out or shut down.


svn path=/trunk/KDE/kdelibs/; revision=909140
2009-01-11 03:48:29 +00:00
Aaron J. Seigo
35304c269d revert #898716 as it regressed bug #167430, fix the problem by not transforming the svg in FrameSvgPrivate::updateSizes
CCBUG:167430

svn path=/trunk/KDE/kdelibs/; revision=905645
2009-01-04 19:07:46 +00:00