Commit Graph

42 Commits

Author SHA1 Message Date
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
Marco Martin
450e4a88a3 use a qregion instead of a qbitmap for the frame
resizing is same speed, still pixmap->bitmap->region
just repainting should be quite faster
one of the last bic changes

svn path=/trunk/KDE/kdelibs/; revision=897385
2008-12-15 22:17:59 +00:00
Ivan Čukić
9a5ebc1669 Custom mask support
svn path=/trunk/KDE/kdelibs/; revision=897285
2008-12-15 16:49:55 +00:00
Marco Martin
4bca5e12ec stop timers and clear list to save also here
svn path=/trunk/KDE/kdelibs/; revision=895381
2008-12-10 15:45:34 +00:00
Aaron J. Seigo
9edf9c2ac0 do the cheap check first
svn path=/trunk/KDE/kdelibs/; revision=894561
2008-12-08 21:31:13 +00:00
Marco Martin
8328875f4c delay insertion into the pixmap cache of all prefix that is being
resized and save all of them at once at a timer event.
this way when a big number of scales is done in little time (e.g. applet
reszing) prevents too many disk writes and qimage conversions

svn path=/trunk/KDE/kdelibs/; revision=890663
2008-11-29 19:24:40 +00:00
Aaron J. Seigo
4b08c03726 change KDE includes to use the .h style now that we're in libs
svn path=/trunk/KDE/kdelibs/; revision=879795
2008-11-04 02:04:34 +00:00
Aaron J. Seigo
1b523b9054 ok, this time JUST the plasma dir ;)
svn path=/trunk/KDE/kdelibs/; revision=879759
2008-11-03 23:08:39 +00:00
Aaron J. Seigo
fa5a2d87d9 bum-de-dum! plasma to kdelibs.
svn path=/trunk/KDE/kdelibs/; revision=879757
2008-11-03 23:03:26 +00:00
Kevin Ottens
f66b4d819b API changes as announced:
* ConfigXml becomes ConfigLoader
  * Containment::(add|remove)ToolBoxTool(QAction *action) becomes
    Containment::(add|remove)ToolBoxAction(QAction *action)
  * Flash becomes FlashingLabel
  * Icon becomes IconWidget
  * PanelSvg becomes FrameSvg

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=877504
2008-10-29 17:46:33 +00:00