Commit Graph

203 Commits

Author SHA1 Message Date
Marco Martin
7df2e103c5 a new private class EffectWatcher, used to be signaled when a particular KWin effect is enabled/disabled.
in future could become public but only after has been proved is really correct

svn path=/trunk/KDE/kdelibs/; revision=1214633
2011-01-15 17:51:55 +00:00
Aaron J. Seigo
f41ce1601b FEATURE: formalize how the homepage for branding purposes is gotten at via the theme.
(this has been a TODO in the code since 4.2!)

svn path=/trunk/KDE/kdelibs/; revision=1209505
2010-12-27 00:46:17 +00:00
Manuel Mommertz
0594bd9d85 Use correct on-disk pixmap cache
svn path=/trunk/KDE/kdelibs/; revision=1206190
2010-12-13 20:14:52 +00:00
Davide Bettio
6855137e40 Use Horos as default wallpaper instead of Ethais.
svn path=/trunk/KDE/kdelibs/; revision=1206147
2010-12-13 15:18:29 +00:00
Albert Astals Cid
9f7b20829a Replace slow foreach constructs with faster ones
Acked by Marco

svn path=/trunk/KDE/kdelibs/; revision=1206126
2010-12-13 13:36:08 +00:00
Aaron J. Seigo
5b9d43d060 * this introduces a Theme object used by Svg to cache the rendering of svg's asking to be colorized, but which are not part of the theme. this requires an independent cache and set of color files, therefore a second Theme object.
* not dropping the cache just because we change themes; this made sense when just plasma-desktop used this or when the apps using Plasma::Theme all used the same theme. this is no longer the case, really, and having applications changing themes randomly kicking the cache out from underneath other apps that may still be using it is undesirable. this does mean that cache files will accumulate. not sure that's a big issue as they don't tend to be large and are in an area marked as "cache" (so ripe for clean-without-care)
* cleanups such as getting rid of superfluous use of Plasma:: namespacing in code that is now in libplasma, such as the stylesheeting. (it was from a plasmoid sebas wrote originally, iirc, explaining the historical reason for the explicit namespacing)

svn path=/trunk/KDE/kdelibs/; revision=1203345
2010-12-03 17:09:09 +00:00
Aaron J. Seigo
ff8aea50c6 use the theme itself, not the default theme, for the style sheet. also fix up some whitespace warts.
svn path=/trunk/KDE/kdelibs/; revision=1201685
2010-11-28 11:13:27 +00:00
Ingomar Wesp
00e6b5af10 was a bit overzealous with this const'ification. sorry...
svn path=/trunk/KDE/kdelibs/; revision=1191194
2010-10-29 22:30:10 +00:00
Ingomar Wesp
e049ecb34d Do not require an exact match for size hinted elements, but search for the smallest size hinted element that is bigger than the display size. Thanks to mommertz, who outlined and mentored this patch, element ids are cached both locally and in the theme, so no additional calls to createRenderer are required.
This was discussed in <http://svn.reviewboard.kde.org/r/5689/>.

svn path=/trunk/KDE/kdelibs/; revision=1191192
2010-10-29 22:14:18 +00:00
Manuel Mommertz
8bab6af5ff add hover and focus colors for view elements to Plasma::Theme::color()
svn path=/trunk/KDE/kdelibs/; revision=1184285
2010-10-09 18:14:11 +00:00
Aaron J. Seigo
298921962f this string already exists, svgzName.
svn path=/trunk/KDE/kdelibs/; revision=1183475
2010-10-07 13:51:31 +00:00
Ivan Čukić
14e2cdd885 Fixed fallback element breakage introduced by 1182546
svn path=/trunk/KDE/kdelibs/; revision=1183402
2010-10-07 11:09:06 +00:00
Aaron J. Seigo
103415153b save a couple when searching deeper
svn path=/trunk/KDE/kdelibs/; revision=1182546
2010-10-04 21:50:42 +00:00
Aaron J. Seigo
8a5f0f2f39 use QLatin1Literal; probably not necessary everywhere QStringBuilder is used in these files, as some are not hot paths, but the cache look ups at least are
svn path=/trunk/KDE/kdelibs/; revision=1181949
2010-10-02 20:06:47 +00:00
Manuel Mommertz
1d82f58e41 allow SVGs to use systemcolors
svn path=/trunk/KDE/kdelibs/; revision=1181642
2010-10-01 16:04:34 +00:00
Manuel Mommertz
93242199ac ButtonBackgroundColor should be the normal background of buttons not the active one
svn path=/trunk/KDE/kdelibs/; revision=1180219
2010-09-27 12:08:24 +00:00
Aaron J. Seigo
18d8032b3b use QStringBuilder
svn path=/trunk/KDE/kdelibs/; revision=1178056
2010-09-22 07:46:09 +00:00
Manuel Mommertz
404c4b310d improved discardCache function
- if the theme changed recreate the cache
- if the theme is the same just clear it
- on colorscheme change keep svgElementsCache as element names and sizes are unchanged

svn path=/trunk/KDE/kdelibs/; revision=1173948
2010-09-10 23:03:24 +00:00
Christoph Feck
9699d16a19 Do not hard code font sizes or names
Also, avoid constructing a font in the first place. This might help
for the (original) bug 198294, where Plasma::Theme::font() crashes
in widget creation.

CCBUG: 198294

svn path=/trunk/KDE/kdelibs/; revision=1143197
2010-06-26 20:55:52 +00:00
Christoph Feck
d4016c881f SVN_SILENT Remove unused Q_UNUSED macro
because the the variable is used but there is no Q_USED macro
(commit message changed for thiago because he thinks the previous
commit message was wrong ;)

svn path=/trunk/KDE/kdelibs/; revision=1143189
2010-06-26 20:33:10 +00:00
Christoph Feck
26ca332629 SVN_SILENT Q_UNUSED
svn path=/trunk/KDE/kdelibs/; revision=1143188
2010-06-26 20:29:58 +00:00
Christoph Feck
8ba19991d7 SVN_SILENT Q_USED
svn path=/trunk/KDE/kdelibs/; revision=1143186
2010-06-26 20:24:23 +00:00
Marco Martin
f8cdf8c2e3 setUseGlobalSettings(false); should work also with applications that start with plasma-
svn path=/trunk/KDE/kdelibs/; revision=1141943
2010-06-23 21:16:20 +00:00
Marco Martin
70941efc56 still try to read from the theme if the defaultWallpaperTheme is the default, plasma themes with wallpapers work again
svn path=/trunk/KDE/kdelibs/; revision=1141773
2010-06-23 13:03:13 +00:00
Aaron J. Seigo
404981d52b the app is no longer "plasma" and we have several of them, so fix this matching
svn path=/trunk/KDE/kdelibs/; revision=1138352
2010-06-15 20:08:46 +00:00
Aaron J. Seigo
1f216930ce quiet up some debug that isn't really needed and only gives people concern :)
svn path=/trunk/KDE/kdelibs/; revision=1134913
2010-06-05 17:35:12 +00:00
Aaron J. Seigo
e5ffc3ce8a make it const
svn path=/trunk/KDE/kdelibs/; revision=1126032
2010-05-13 00:51:22 +00:00
Sebastian Kügler
4e07d87284 Support for Plasma::Theme-themed stylesheets
This new API returns a stylesheet in Plasma theme colors and
can be used for hybrid widgets

svn path=/trunk/KDE/kdelibs/; revision=1125362
2010-05-11 08:23:41 +00:00
Adenilson Cavalcanti Da Silva
e6e20afd70 Fixing javascript animation mapping.
svn path=/trunk/KDE/kdelibs/; revision=1123281
2010-05-05 19:43:45 +00:00
Michael Pyne
1198bd897a Port Plasma::Theme to use KImageCache. If it breaks, let me know, but aseigo has been using
this quite successfully for a few days now so hopefully it should be just fine for you all.

svn path=/trunk/KDE/kdelibs/; revision=1122518
2010-05-04 03:59:35 +00:00
Aaron J. Seigo
efd1c16c3e themed animations; pick up wallpaper settings from fallback themes if the current theme doesn't provide one
svn path=/trunk/KDE/kdelibs/; revision=1120241
2010-04-28 17:40:29 +00:00
Marco Martin
997e6b32ea since imagePath is regularly used to check if images are present, be a bit more quiet
svn path=/trunk/KDE/kdelibs/; revision=1111731
2010-04-06 15:06:41 +00:00
Marco Martin
aa4544bd78 look for elements in the translucent folder when we have the blurback effect enabled
svn path=/trunk/KDE/kdelibs/; revision=1108402
2010-03-28 19:37:29 +00:00
Aaron J. Seigo
5ed6f6d546 cleanup the pixmaps before app exit, otherwise they can leak into x
svn path=/trunk/KDE/kdelibs/; revision=1099009
2010-03-04 22:28:39 +00:00
Davide Bettio
4e7fa2f852 Replaced default wallpaper.
svn path=/trunk/KDE/kdelibs/; revision=1073285
2010-01-11 22:43:19 +00:00
Davide Bettio
e16960fa55 Replaced default wallpaper.
svn path=/trunk/KDE/kdelibs/; revision=1061219
2009-12-11 01:35:13 +00:00
Aaron Charles Reichman
4c31342c2e Fixed some spelling errors flagged by krazy
svn path=/trunk/KDE/kdelibs/; revision=1060866
2009-12-10 09:16:30 +00:00
Aaron J. Seigo
f0f6b91bd5 always return, just in case
svn path=/trunk/KDE/kdelibs/; revision=1045310
2009-11-05 18:53:56 +00:00
Aaron J. Seigo
154f7d0e38 use the ThemeGlobal kconfigxt class in Theme
svn path=/trunk/KDE/kdelibs/; revision=1032413
2009-10-07 18:44:33 +00:00
Aaron J. Seigo
c4079787fa simplify the discardCache call; makes sanitizing this code easier (e.g. never having a null pointer!)
svn path=/trunk/KDE/kdelibs/; revision=1015481
2009-08-25 16:13:27 +00:00
Marco Martin
3d96f8eb2c just say you didn't found the item, don't nuke the whole cache
svn path=/trunk/KDE/kdelibs/; revision=1006969
2009-08-04 19:54:58 +00:00
Aaron J. Seigo
2c8ad98fdb use value instead of [] to avoid empty or uninteresting elements in the collection
svn path=/trunk/KDE/kdelibs/; revision=1006949
2009-08-04 19:13:58 +00:00
Marco Martin
02e6870f4e when releasing an element from the rect cache, remove it from memory,
but write it to disk anyways

svn path=/trunk/KDE/kdelibs/; revision=1005300
2009-07-31 18:58:16 +00:00
Marco Martin
f37ed173ad pursuing zero svg renderers instantiated:
most elements have a single _, correct way should be names starting by _

svn path=/trunk/KDE/kdelibs/; revision=1005293
2009-07-31 18:47:20 +00:00
Marco Martin
d3f77afd1f this made findInCache always fail.
still a bit too many fails tough

svn path=/trunk/KDE/kdelibs/; revision=1004775
2009-07-30 20:39:52 +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
47b8b802ac standardize link colors
svn path=/trunk/KDE/kdelibs/; revision=993491
2009-07-08 19:25:20 +00:00
Laurent Montel
dd7b192f28 const'ify
svn path=/trunk/KDE/kdelibs/; revision=992168
2009-07-06 11:55:34 +00:00
Aaron J. Seigo
023ecb90d5 prevent multiple inclusions of the same theme and infinite cycles due to cascading fallbacks
svn path=/trunk/KDE/kdelibs/; revision=987550
2009-06-26 10:20:51 +00:00
Aaron J. Seigo
6bf6cb66db allow for fallbacks themes, and more than one at a time; will backport to address visual backwards compat with the oxy->air change
svn path=/trunk/KDE/kdelibs/; revision=987538
2009-06-26 10:02:32 +00:00
Aaron J. Seigo
cda7c7274b no need for two of these methods
svn path=/trunk/KDE/kdelibs/; revision=979855
2009-06-10 15:45:28 +00:00
Marco Martin
81e345bb95 using the active link color as highlight color makes really no sense,
the mouseover glow color is a bit better
CCBUG:195465

svn path=/trunk/KDE/kdelibs/; revision=979261
2009-06-09 11:52:18 +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
dfd591aa73 we only care about config file changes in teh case of the default theme; all other themes are on their own on this one
svn path=/trunk/KDE/kdelibs/; revision=972838
2009-05-25 20:02:29 +00:00
Aaron J. Seigo
3984fdb402 if the name is empty, don't even bother, and spew and error
svn path=/trunk/KDE/kdelibs/; revision=969912
2009-05-19 08:53:56 +00:00
Aaron J. Seigo
8b7bb8b125 * add ability to list info for all available themes
* add ability to create a Theme object for a specific theme without first accessing the defaults

svn path=/trunk/KDE/kdelibs/; revision=969464
2009-05-18 12:28: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
Aaron J. Seigo
614954756b we probably don't really need to see this on start up
svn path=/trunk/KDE/kdelibs/; revision=960581
2009-04-28 17:10:17 +00:00
Arthur Renato Mello
6c5889f323 Check useCache() before using pixmapCache that could be not instantiated.
svn path=/trunk/KDE/kdelibs/; revision=947031
2009-03-30 19:46:01 +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
Wang Kai
daef833362 BUG: 179684
BUG: 181451
sync the config, and connect the config file's create signal
so Plasma::Theme::themeChanged() work across process 

svn path=/trunk/KDE/kdelibs/; revision=933145
2009-02-28 06:40:54 +00:00
Aaron J. Seigo
a88f2d8247 FEATURE: allow themes to state that they should use the native widgets
svn path=/trunk/KDE/kdelibs/; revision=931193
2009-02-24 22:42:06 +00:00
Aaron J. Seigo
01e4d0916a don't bother writing the settings if we just read them!
svn path=/trunk/KDE/kdelibs/; revision=931141
2009-02-24 20:49:46 +00:00
Aaron J. Seigo
9ade53ab61 try and watch the config file for changes and reload the theme at that point; for some reason KDirWatch::addFile isn't working for me, but KDirWatch::addDir is? hmm...
svn path=/trunk/KDE/kdelibs/; revision=916823
2009-01-26 06:22:44 +00:00
Aaron J. Seigo
b4b0494129 use plasmarc
svn path=/trunk/KDE/kdelibs/; revision=916816
2009-01-26 04:41:39 +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
7031c9a7c4 make the Wallpaper section of metadata.desktop actually work
svn path=/trunk/KDE/kdelibs/; revision=904433
2009-01-02 10:52:14 +00:00
Andrew Lake
fc4ef631d4 For kdisplayPalleteChanged signals, emit themeChanged() after updating
plasma color scheme, not simultaneously.

svn path=/trunk/KDE/kdelibs/; revision=902575
2008-12-28 17:50:32 +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
Davide Bettio
60a42ae854 Air is the new default wallpaper.
svn path=/trunk/KDE/kdelibs/; revision=897711
2008-12-16 17:28:25 +00:00
Aaron J. Seigo
e317155238 make sure the rects cache file is always valid
BUG:177463

svn path=/trunk/KDE/kdelibs/; revision=895593
2008-12-11 06:24:25 +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
Aaron J. Seigo
7cfce67821 lists to sets and trying to do fewer collection lookups
svn path=/trunk/KDE/kdelibs/; revision=895540
2008-12-10 23:17:12 +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
6d0e474ba9 detach from the config of rects cache before deleting it
svn path=/trunk/KDE/kdelibs/; revision=895360
2008-12-10 14:21:08 +00:00
Aaron J. Seigo
a6140d5a27 use isEmpty; a couple minor, minor changes that crept in while debugging things elsewhere
svn path=/trunk/KDE/kdelibs/; revision=895022
2008-12-09 20:37:41 +00:00
Aaron J. Seigo
e377d738ec base the name of the cache on the theme name so that different apps can share it (krunner, plasa, etc)
svn path=/trunk/KDE/kdelibs/; revision=892641
2008-12-04 20:13:50 +00:00
Marco Martin
5a987e0a0b no longer uses plasmarc for the presence or not of those hints but uses
the usual theme specific file.
and expires the cache when system color changes and a tinting is
required.
for some reasons a plasma restart is still required to get colors
applied correctly, some renderer doesn't get properly deleted on theme
change?

svn path=/trunk/KDE/kdelibs/; revision=885241
2008-11-16 20:53:24 +00:00
Marco Martin
67e6abb7f5 discard cache when composite changes
would make too many deletions?
another way could be including the compositing state in the cache key
but would be  a bit complex...

svn path=/trunk/KDE/kdelibs/; revision=883978
2008-11-13 22:41:02 +00:00
Marco Martin
b8490cc745 when the modification time of the metadata file, discard the cache
svn path=/trunk/KDE/kdelibs/; revision=882120
2008-11-09 20:41:27 +00:00
Aaron J. Seigo
df73771a1b ++compile
svn path=/trunk/KDE/kdelibs/; revision=879801
2008-11-04 02:55:37 +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
Laurent Montel
53c6071fc8 Fix mem leak found by valgrind
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874299
2008-10-21 07:33:06 +00:00
Aaron J. Seigo
2f501ace5e make cache strategies configurable
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=872726
2008-10-17 23:41:34 +00:00
Aaron J. Seigo
5197a55791 allow setting of the disk cache size; init it to "no limit", so we can see how that puppy grows with time
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=872362
2008-10-17 02:26:26 +00:00
Marco Martin
3f5ddc5aee fix a typo
put "Size" siffix to sizes, so now we can have an element called "invalidElement" 
avoid duplicate entries in invalidElement

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=872254
2008-10-16 18:34:43 +00:00
Marco Martin
089fb6ea94 cache on disk rects of elements and the not-existence of them
should avoid some calls of createRenderer() the second time it's queried

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=872250
2008-10-16 18:25:20 +00:00
Aaron J. Seigo
6374635bf3 on disk pixmap cache, and use it agressively for svg's. first step towards "no svg parsing on second run"!
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=871870
2008-10-15 20:55:07 +00:00
Allen Winter
c4573eae9a use QString::clear() to clear a QString instead of assigning QString().
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870305
2008-10-12 11:05:42 +00:00
Allen Winter
a7aebfa60a a bunch more coding style fixes. still some lines longer than 100 chars.
this is definitely helping me find false positives in the Krazy style checker.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870161
2008-10-11 22:48:38 +00:00
Aaron J. Seigo
1f95d86db4 * add DesktopFont
* provide button colors

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=868328
2008-10-06 04:10:34 +00:00
Fredrik Höglund
48b41f3a85 Creating a KColorScheme is expensive, so let's not do that every time
someone calls Theme::color().

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=867517
2008-10-03 17:44:04 +00:00
Aaron J. Seigo
35f8bbcc64 be careful with relative paths and symlinks in packages and themes; we don't want widgets referencing random files/resources, just stuff in the given package
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=848476
2008-08-17 20:52:37 +00:00
Aaron J. Seigo
63bce9d1b4 move all the prive code into private/; makes it much clearer with the division lines are
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=839792
2008-07-30 20:35:42 +00:00
Alessandro Diaferia
e9386fe8dc fallback to default theme also when a plaint svg is used
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=838356
2008-07-27 15:50:00 +00:00
Aaron J. Seigo
538272d133 make Theme::currentThemeHasImage check for compressedsvg files
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=836139
2008-07-21 19:36:47 +00:00