Marco Martin
c3925a3496
* added new function panelSize() that returns the size of the panel (and
...
not of the svg)
* some valid pointers checks
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803637
2008-05-03 16:03:44 +00:00
Marco Martin
9c588df3bb
Added the overloaded function
...
bool hasElementPrefix(Plasma::Location location) const;
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803268
2008-05-02 13:25:04 +00:00
Marco Martin
b4ee14d44f
don't erase the entire cache when updating the sizes of a single panel,
...
so the cache for multiple items now actually works :)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803217
2008-05-02 10:32:47 +00:00
Marco Martin
0f1809e9f4
new function bool hasElementPrefix(prefix) that checks if the given
...
element prefix exists for the loaded svg
and build fix woops
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803066
2008-05-01 20:09:24 +00:00
Marco Martin
5939dfc87c
scale the svg elements at the right size in case of stretched borders
...
and/or
not tiled center element.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803061
2008-05-01 19:51:41 +00:00
Marco Martin
703b6c2ffa
* adds a new convenience method getMargins(&qreal,&qreal,&qreal,&qreal)
...
to fetch all the four margins at a time
* now applet uses it
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802928
2008-05-01 09:49:30 +00:00
Robert Knight
cdb840d200
Print warnings if trying to assign invalid sizes to a panel or trying to generate a panel background with an invalid size. Prevents attempts to paint on an invalid pixmap leading to XRender errors.
...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801852
2008-04-27 22:34:24 +00:00
Aaron J. Seigo
de3ab77f26
paint -> paintPanel. allows one to use the Svg api directly when you have a PanelSvg class and falls into line with the resize->resizePanel change as well.
...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801077
2008-04-25 16:18:51 +00:00
Aaron J. Seigo
f4cb38cef1
cache clearing fixes, some performance improvements
...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800759
2008-04-24 19:49:24 +00:00
Aaron J. Seigo
2e71b7a700
* clear() the panels list after deleting the items (fixes crash)
...
* resize -> resizePanel ... resolves a semantically annoying ambiguity now that it subclasses Svg
* don't use the [] accessor more than necessary
* slightly clearer code in places
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800283
2008-04-23 20:38:09 +00:00
Aaron J. Seigo
d52b839cf9
we need to signal a repain on borders changing.
...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800186
2008-04-23 16:18:45 +00:00
Marco Martin
d0ba4e77ec
Api change:
...
Plasma::Svg(imagePath, parent) -> Plasma::Svg(parent) and
Plasma::PanelSvg(imagePath, parent) -> Plasma::PanelSvg(parent)
updated as needed every class that was using Svg or PanelSvg
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800143
2008-04-23 13:07:41 +00:00
Marco Martin
203fda098d
PanelSvg now is a subclass of Plasma::Svg so it doesn't use anymore an internal istance of Plasma::Svg
...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=799908
2008-04-22 20:25:28 +00:00
Marco Martin
85a1f0e516
use a separate cache for each elementPrefix, this will speed up
...
rendering a lot if prefixes are switched very often. this will make
possible for instance to render the background of taskbar items with a
PanelSvg.
This behaviour is disabled by default, you can enable/disable it with
setCacheAllRenderedPanels(bool), get with cacheAllRenderedPanels() and
erase the entire cache with clearCache()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=799411
2008-04-21 14:01:46 +00:00
Marco Martin
f522c38eeb
file() and setFile() -> imagePath() and setImagePath()
...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797772
2008-04-16 20:48:53 +00:00
Marco Martin
6024f48475
Api changes to PanelSvg finished:
...
-now it's a Plasma::Svg
-DrawTopBorder DrawLeftBorder etc -> TopBorder LeftBorder etc
-contentAtOrigin -> out of flags
-setFile() -> setImagePath()
-setBorderFlags() -> setEnabledBorders()
-added resize(qreal,qreal)
-setPrefix() -> setElementsPrefix()
-updateSizes() -> Q_PRIVATE_SLOT
-pos() setPos() removed, now pos is a parameter of paint
-setLocation() -> setElementPrefix(enum)
-location() removed
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797736
2008-04-16 20:17:36 +00:00
Marco Martin
d07a60c581
Rename SvnPanel into PanelSvg and update accordingly who is using that,
...
as discussed in api reviews
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797663
2008-04-16 17:23:58 +00:00