Commit Graph

145 Commits

Author SHA1 Message Date
Aaron J. Seigo
bbe18dd67d QStringBuilder
svn path=/trunk/KDE/kdelibs/; revision=1178057
2010-09-22 07:47:15 +00:00
Aaron J. Seigo
b630dc66ff translate this comment a bit
svn path=/trunk/KDE/kdelibs/; revision=1177656
2010-09-20 19:48:45 +00:00
Aaron J. Seigo
9f7ce4026c make this consistent with pixmap() at least, but the multiple images handling still looks broken
svn path=/trunk/KDE/kdelibs/; revision=1177645
2010-09-20 19:42:38 +00:00
Aaron J. Seigo
1b826931d3 SVN_SILENT: being picky
svn path=/trunk/KDE/kdelibs/; revision=1173600
2010-09-09 20:10:33 +00:00
Aaron J. Seigo
de28184c32 use QSvgRenderer, now that KSvgRenderer is a shallow wrapper around it since QSvgRenderer gained it's (previously) add-on functionality to QSvgRenderer
svn path=/trunk/KDE/kdelibs/; revision=1140887
2010-06-21 18:28:47 +00:00
Marco Martin
3660bcf30d adjust the width/height by the offset, don't calculte another offset that is plain wrong
svn path=/trunk/KDE/kdelibs/; revision=1111250
2010-04-05 09:20:59 +00:00
Marco Martin
fd3cb4d9a0 SVN_SILENT
less noise

svn path=/trunk/KDE/kdelibs/; revision=1091739
2010-02-17 12:39:23 +00:00
Marco Martin
d661297dc3 unbreak actualElementId
svn path=/trunk/KDE/kdelibs/; revision=1090746
2010-02-15 22:55:43 +00:00
Marco Martin
de832d5e60 when asking to render an element, search before for one with a width-height- prefix. if not found, fallback to the usual one
svn path=/trunk/KDE/kdelibs/; revision=1090743
2010-02-15 22:49:19 +00:00
Marco Martin
5f1cde4b29 try to align elements to the pixel grid, if it was not exactly alighed to integer positions and sizes
svn path=/trunk/KDE/kdelibs/; revision=1090708
2010-02-15 20:36:35 +00:00
Aaron J. Seigo
c27ddab67e QPointer -> QWeakPointer
svn path=/trunk/KDE/kdelibs/; revision=1034904
2009-10-13 21:43:35 +00:00
Christoph Feck
1a94dec4e2 Fix color aware themes
BUG: 208841

svn path=/trunk/KDE/kdelibs/; revision=1031687
2009-10-05 18:57:06 +00:00
Aaron J. Seigo
1a7416e23b avoid hitting disk repeatedly on svg find failure
svn path=/trunk/KDE/kdelibs/; revision=1029044
2009-09-28 20:41:37 +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
f9d7a4bfa2 be absolutely sure to reset the natural size and renderer of the svg when theme or path changing
BUG:194948

svn path=/trunk/KDE/kdelibs/; revision=976576
2009-06-02 06:00:00 +00:00
Aaron J. Seigo
214c0348a3 put the delayed write-to-cache in theme rather than svg; this means that there is one collection per theme instead of one per svg, one timer per theme rather that one per svg and one write out to cache for the theme. win!
svn path=/trunk/KDE/kdelibs/; revision=975389
2009-05-30 03:08:33 +00:00
Aaron J. Seigo
ddbd8d2709 sometimes the fixes are simple :)
BUG:194194

svn path=/trunk/KDE/kdelibs/; revision=973270
2009-05-26 18:29:28 +00:00
Aaron J. Seigo
7e4ca0dd7b revert last change; we always care when the theme changes on us
svn path=/trunk/KDE/kdelibs/; revision=972836
2009-05-25 19:59:53 +00:00
Marco Martin
9a2967bd81 if we are not displaying the default theme we don't care if it changes
svn path=/trunk/KDE/kdelibs/; revision=971592
2009-05-22 20:47:02 +00:00
Aaron J. Seigo
195df16da7 * only set the image path when setTheme is called if we have one already set
* check for colourization after the path is set so that it, well, actually works. oops.

svn path=/trunk/KDE/kdelibs/; revision=969913
2009-05-19 08:54:56 +00:00
Aaron J. Seigo
c0dcfc94eb simply the code somewhat
svn path=/trunk/KDE/kdelibs/; revision=969582
2009-05-18 13:43:49 +00:00
Aaron J. Seigo
f44b6a256f be a bit more careful with accessing the internal theme pointer, try a bit harder not to cause creation of the defaultTheme if it hasn't been
svn path=/trunk/KDE/kdelibs/; revision=969534
2009-05-18 13:20:52 +00:00
Aaron J. Seigo
939954fac0 * delay initialization of the theme pointer to the defaultTheme so that unthemed svgs don't incur the penalty of associating with the default theme, and new svg's have the chance to set their theme before setImagePath is called.
* always use the theme pointer and never defaultTheme() directly

svn path=/trunk/KDE/kdelibs/; revision=969469
2009-05-18 12:42:02 +00:00
Aaron J. Seigo
c7399bcbc2 allow setting the theme to use with the svg; removes assumptions that the current default theme is the appropriate source for file and cache data
svn path=/trunk/KDE/kdelibs/; revision=969461
2009-05-18 12:26:57 +00:00
Aaron J. Seigo
170e38756f usingDiskCache -> usingRenderingCache; removes the implementation detail that it's caching to a disk from the method names; also revert the eroneous setter i added to Wallpaper, it was already there as isUsingRenderingCache
svn path=/trunk/KDE/kdelibs/; revision=967627
2009-05-13 16:13:56 +00:00
Aaron J. Seigo
0ab881867d allow caching to be turned off for Svg objects which won't benefit from it
svn path=/trunk/KDE/kdelibs/; revision=967623
2009-05-13 16:07:58 +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
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
Olivier Goffart
9264bd3e76 Plasma::Svg: Round the drawing size to the pixmap size, otherwise we can get bad arctefacts.
(noticable on the eyes applet)


svn path=/trunk/KDE/kdelibs/; revision=941021
2009-03-18 18:06:56 +00:00
Arthur Renato Mello
827f5f19be Add support to check with file timestamp if cache for Plasma::Svg is still valid.
svn path=/trunk/KDE/kdelibs/; revision=940638
2009-03-17 21:08:48 +00:00
David Faure
457f6c8c90 A precise warning about a missing icon is much easier to parse than
QFSFileEngine::open: No file name specified.

Approved by notmart (which is better than "not approved by mart" ;-)

svn path=/trunk/KDE/kdelibs/; revision=918255
2009-01-29 18:16:05 +00:00
Marco Martin
c532c9fda5 initialize the natural size also for absolute path svgs
never insert the whole image (no element) in the invalid list

to backport or not to backport?
CCMAIL plasma-devel@kde.org

svn path=/trunk/KDE/kdelibs/; revision=915328
2009-01-22 19:59:25 +00:00
Marco Martin
22b6670f00 cache on disk the natural svg size
svn path=/trunk/KDE/kdelibs/; revision=912132
2009-01-16 19:14:38 +00:00
Marco Martin
8a0159e10e ensure that size() always return the real size
svn path=/trunk/KDE/kdelibs/; revision=912123
2009-01-16 18:43:26 +00:00
Marco Martin
ab3501872d ensure that resize() resize always to the natural size (cached, so we
don't create unnecessary renderers)

svn path=/trunk/KDE/kdelibs/; revision=912093
2009-01-16 17:41:49 +00:00
Aaron J. Seigo
512bcd03a9 insert into the local cache
svn path=/trunk/KDE/kdelibs/; revision=911758
2009-01-16 02:46:33 +00:00
Laurent Montel
eebb6178a5 Fix iterator
svn path=/trunk/KDE/kdelibs/; revision=906617
2009-01-06 13:09:05 +00:00
Aaron J. Seigo
8c8e40c194 if parented to an applet and the appet has a package, use it.
svn path=/trunk/KDE/kdelibs/; revision=906378
2009-01-06 03:45:44 +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
Andrew Lake
fb3d7e75cb colorScheme and buttonColorScheme need to be updated the color changes
for system-color themes.  Also clear out itemsToSave on colorChange.

svn path=/trunk/KDE/kdelibs/; revision=898780
2008-12-19 01:48:42 +00:00
Andrew Lake
b8c4897535 Reset size when renderer is erased. Should fix wierd border sizing
bug when changing to certain themes.

svn path=/trunk/KDE/kdelibs/; revision=898716
2008-12-18 20:28:09 +00:00
Aaron J. Seigo
f4486e8862 * remove in-memory entries for invalid elements when an svg is no longer in use
* remove in-memory entries for invalid elements when the rect cache is invalidated for an svg

svn path=/trunk/KDE/kdelibs/; revision=895570
2008-12-11 02:45:45 +00:00
Marco Martin
232986330b clear local memory caches and stop cache timers when theme changes
svn path=/trunk/KDE/kdelibs/; revision=895370
2008-12-10 14:35:44 +00:00
Marco Martin
2af3225c26 size.isEmpty() does the same and looks nicer, good catch sebas :)
svn path=/trunk/KDE/kdelibs/; revision=894919
2008-12-09 16:22:03 +00:00
Marco Martin
e166600984 last commit was indeed correct but the whole thing still a bit wrong..
the other  problem was that cachePath() did take the wrong size, the size
of the whole svg vs the size of the element to be drawn (and that was my
bad, so we can share the misery now, aaron:)

CCBUG:177172

svn path=/trunk/KDE/kdelibs/; revision=894713
2008-12-09 09:03:12 +00:00
Marco Martin
ff8af18497 a size like QSize(10,0) is valid but will end up in a null pixmap, and
this thing did confuse the cache a lot
CCBUG: 177172
does this patch fixes it? will keep open a day to be really sure :)

svn path=/trunk/KDE/kdelibs/; revision=894591
2008-12-08 22:22:18 +00:00
Aaron J. Seigo
7bc2bfd8da constBegin
svn path=/trunk/KDE/kdelibs/; revision=894558
2008-12-08 21:27:42 +00:00
Aaron J. Seigo
e328a0a6c1 build .. =/
svn path=/trunk/KDE/kdelibs/; revision=894557
2008-12-08 21:26:46 +00:00