Commit Graph

142 Commits

Author SHA1 Message Date
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
Aaron J. Seigo
9732101c83 support compressed svg files
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=835219
2008-07-20 09:23:59 +00:00
Marijn Kruisselbrink
21b148b963 change all ClassName::Private classes to ClassNamePrivate, and adjust friends accordingly; this makes plasma compilable with gcc < 4.2
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=826893
2008-07-01 18:56:43 +00:00
Aaron J. Seigo
cd2feaca66 while writing documentation it occurred to me that the colors file is the wrong place for this: it must be possible to define a wallpaper and colors separately
also put the checking for wallpapers in the theme into theme initialization instead of doing it on every wallpaper lookup

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=825612
2008-06-28 20:20:22 +00:00
Aaron J. Seigo
96c004fc9d SVN_SILENT: didn't mean to leave this debug output activated
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=825597
2008-06-28 19:08:14 +00:00
Aaron J. Seigo
f4b17accac Plasma::Theme::wallpaperPath(const QSize&)
a nice improvement that fixes a small handful of packaging bugs and nuisances.
it allows us to do away with harcoding the wallpaper in multiple places (previously 3 places) in application code. as an extra bonus is also allows:

* the theme to define the default wallpaper
* the theme to ship with a default wallpaper (perhaps later on we can load wallpapers shipped with a theme in the config dialog?)
* the default wallpaper to defined in the plasmarc file (so downstream doesn't have to hack the code to change it)

CCMAIL:panel-devel@kde.org
CCMAIL:kde-artists@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=825592
2008-06-28 18:57:12 +00:00
Aaron J. Seigo
d03c0f5eb6 when changing the use globals setting, reset the state of the theme to comply
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=820932
2008-06-15 20:09:27 +00:00
Marco Martin
5ddceb467b add Theme::currentThemeHasImage() that checks if the current theme has a
certain svg or if it would fallback to the default theme if loaded.
this makes possible an alternative fallback mechanism between images of
the same theme, used now for the TransparentBackground background hint

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816734
2008-06-04 17:44:37 +00:00
Aaron J. Seigo
b4dc4d9e75 like a rainbow.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816090
2008-06-03 08:51:57 +00:00
Aaron J. Seigo
d14534ba12 allow using the global theme
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=806696
2008-05-12 04:53:13 +00:00
Dan Meltzer
f57cc1c623 Lotsa little ebn fixes.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805672
2008-05-09 05:32:15 +00:00
Aaron J. Seigo
29e32dd145 * compositingActive -> windowTranslucencyEnabled
* slots -> Q_PRIVATE_SLOT

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800343
2008-04-23 22:55:30 +00:00
Aaron J. Seigo
d28a4c277a consolidate color and font methods into one method for each with a role enumeration
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800334
2008-04-23 22:36:00 +00:00
Aaron J. Seigo
7f09f15378 * get rid of setApplication, use the component data instead
* don't keep opening the shared config; do it just once
* avoid copying the KConfigGroup object all the time

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800331
2008-04-23 22:24:07 +00:00
Alex Merry
0f53feb8af warning--
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800327
2008-04-23 22:11:22 +00:00
Anne-Marie Mahfouf
dcdb7b8f9a API review signal changed() -> themeChanged()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800067
2008-04-23 08:35:35 +00:00
Aaron J. Seigo
19b4f6c71f avoid infinite recursion
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800035
2008-04-23 04:50:44 +00:00
Anne-Marie Mahfouf
36bc2c4e97 Plasma::Theme::self() -> Plasma::Theme::defaultTheme() as planned during the sprint
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=799919
2008-04-22 21:10:14 +00:00
Aaron J. Seigo
f1aba49d18 only save to the config file if we are the default theme
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=799909
2008-04-22 20:27:56 +00:00
Dmitry Suzdalev
b237019d4f Plasma API adjustements:
Theme::colors() => Theme::colorScheme()
Theme::image() => Theme::imagePath()

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797634
2008-04-16 15:53:16 +00:00
Marco Martin
afdb5e84a0 reworked how shaped windows with svg backgrounds are obtained:
there is a new function PanelSvg::mask() that returns a qbitmap of the areas of the svg with alpha=0 that can be used to create the mask of the window, at the moment used in tooltip and dialog (krunner still to come).
so now windows that uses svg backgrounds should always set PanelSvg::mask() as their own mask, regardless if composite is active or not.
In this commit there are also two (identical) svgs for opaque tooltips and dialogs with pixelated rounded borders that looks good without antialiasing (and unlike the previous version they are vector based now).

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=782727
2008-03-05 21:03:27 +00:00
Marijn Kruisselbrink
d9706ec25a make this compile on non-X11 platforms all the code that uses X11 is already ifdef-ed out, just the include wasn't yet.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=782684
2008-03-05 19:06:03 +00:00
Aaron J. Seigo
450d289094 color scheme signalling, patch by Andrew Lake
CCMAIL:jamboarder@yahoo.com

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=779435
2008-02-26 05:08:08 +00:00
Aaron J. Seigo
bed3c1d927 * share the package structures by using a single shared ptr
* use the script's contentSizeHint if we are a script

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=779417
2008-02-26 04:08:51 +00:00
Aaron J. Seigo
b8662cb026 adjust the naming of these internal classes for some consistency
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=779403
2008-02-26 01:47:26 +00:00
Aaron J. Seigo
c1d3f89a8b if our name changes, then save it.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=775276
2008-02-15 10:47:56 +00:00
Aaron J. Seigo
cf89bd58d1 make it possible to get at the package structures using Theme::packageStructure() and Applet::packageStructure() without having to export the package definitions from the library itself.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=775272
2008-02-15 10:35:00 +00:00
Aaron J. Seigo
cf6a9e6cb9 add support for locolor support in themes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772585
2008-02-09 04:54:43 +00:00
Aaron J. Seigo
2a051a9315 make Theme react to compositing changes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771968
2008-02-07 10:54:38 +00:00
Aaron J. Seigo
dd87a4e936 find the colors file properly. yay for being able to read the taskbar again.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=766067
2008-01-25 06:10:44 +00:00
Marco Martin
1c5074c7c3 search for different background svgs when composite is disabled
squared edges without shadows are preferred without composite

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=759551
2008-01-10 20:53:13 +00:00
Aaron J. Seigo
2e050f7b05 convenience accessor to background widget colour
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758502
2008-01-08 01:43:13 +00:00
Aaron J. Seigo
ee32d3c996 remove the use of 1209 explicitly now that i have Winter's Magic Formula for default debug space. makes backporting way easier; sorry for the noise of the earlier commit. suppose i should read planetkde.org more closely ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758498
2008-01-08 01:25:09 +00:00
Aaron J. Seigo
12ef6308cb use the plasma debug area (1209); i considered wrapping this in Plasma::debug() but that seems overkill ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758415
2008-01-07 20:50:31 +00:00
Aaron J. Seigo
7be6e23d58 add ability to set the general font to something else at runtime
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751049
2007-12-20 23:44:08 +00:00
Aaron J. Seigo
34bd2b87b2 font accessors for the theme
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750643
2007-12-19 19:56:39 +00:00
Aaron J. Seigo
eda0d2a4ef use Window not View for the text colour. we really need a proper colorscheme here...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742458
2007-11-28 03:20:56 +00:00
Aaron J. Seigo
3166344116 textColor() convenience method
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742361
2007-11-27 21:56:47 +00:00
Aaron J. Seigo
caa4c70909 color scheme support. now to get someone to make a proper color scheme for the default theme =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=732535
2007-11-04 06:57:42 +00:00
Aaron J. Seigo
c8e196295f * allow setting of the theme name (easier runtime configurability)
* if the requested theme does not exist, don't accept it
* if the requested svg can't be found in the current theme, try to find it in the default theme

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=732507
2007-11-04 03:04:55 +00:00
Andreas Pakulat
70f0a9f9be Merge the KConfig branch. This are the 3 main modules (+kdeadmin), which are
needed now because friday is the last BC day. The rest of the modules will
follow as fast as my laptop allows.

svn path=/trunk/KDE/kdelibs/; revision=721704
2007-10-05 22:21:25 +00:00
Aaron J. Seigo
e0f831373c SVN_SILENT: add "or later" clause. cleared with copyright holders, except for rich moore's ui loader which i need to ask him for permission for first.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712549
2007-09-14 19:06:18 +00:00
Aaron J. Seigo
db4a7ebe61 copyright cleanups:
* Copyright (C) -> Copyright
* add "or later" clause to files that i have the sole copyright on
* add current year (2007) to my copyrights where it was missing

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696946
2007-08-06 11:20:02 +00:00
Laurent Montel
95ebda9f32 Fix compile enable final
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690626
2007-07-21 15:58:44 +00:00
Aaron J. Seigo
9789d8b57f make it possible to set the theme per-application, allowing krunner to share plasma's theme by default but amarok to have their own Fun(tm) too
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=689180
2007-07-17 20:51:12 +00:00
Aaron J. Seigo
58277a7608 plug a bunch of memory leaks
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672687
2007-06-07 20:57:18 +00:00
Matt Williams
dfb58b44c1 EBN Fixes
* Include own header file first
* Make d-pointer const
* Use references-to-const

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667001
2007-05-21 14:28:03 +00:00
Thorsten Roeder
c235d2980a some krazy fixes
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=664331
2007-05-13 17:47:20 +00:00
Aaron J. Seigo
5cfabdc869 Plasma::Svg debuts. it is an image centric wrapper around QSvgRenderer that takes care of things such as:
* caching rendered pixmaps
* looking up the images from the Plasma::Theme
* scheduling needed updates, e.g. when the plasma theme changes


svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=640418
2007-03-07 23:27:37 +00:00
Aaron J. Seigo
454c29f187 let's use KPluginInfo
some api refinements

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=639363
2007-03-05 00:07:21 +00:00
Aaron J. Seigo
736e81e422 SVN_SILENT let's just get this over with and reformant the classes that are pretty much expected to remain
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=638722
2007-03-03 01:41:27 +00:00
Matthias Kretz
6ee2e5cb5e merge the kinstance-redesign branch back to trunk.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=628276
2007-01-29 17:14:20 +00:00
Aaron J. Seigo
0c5ef68f2c start adapting to today's api changes
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=619099
2007-01-02 19:05:09 +00:00
Aaron J. Seigo
3de9c853b7 get this to compile at least so i can start to exercise it with krunner
and other such bits. no point on having this just sit on my disk i
suppose =)

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=614239
2006-12-16 23:04:44 +00:00