[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Shadows in deco
From: Thomas =?UTF-8?B?TMO8Ymtpbmc=?= <thomas.luebking () gmail ! com>
Date: 2011-08-13 13:55:21
Message-ID: 20110813155521.747bd0e9 () gmail ! com
[Download RAW message or body]
Am Wed, 03 Aug 2011 19:24:14 +0200
schrieb Martin Gräßlin <mgraesslin@kde.org>:
> Hi deco coders,
Attaching some more ppl., though Christoph gets it through kwin as well
i think ;-)
> given some valid complaints about two different shadow systems
=)
--- for ppl. who did not read the patch -------
I assume the supposed way to use it, is to have the dcorations factory
the shadow images/pixmaps via the non virtual (protected?) function/s
and have the compositor read them via the non virtual public functions.
The shadow data itself resides as private member in the factory object.
--------------
a) that's BIC :-)
b) i guess when extrapolating this to the KDecoration you intend to use
a static private member? (all deco shadows being the same)
c) API thoughts:
void setShadow(const QImage &shadow, const QRect ¢er, QRect
&expanded, Type = Focused);
void unsetShadow(Type = Focused);
void setShadowCrossfadeDuration(int ms);
The center rect implicitly defines 9 tiles on the shadow image.
Since shadow images will usually be created in a block (either loaded
from HD or when painted to avoid edge folding) there's hardly a point
in haveing each decoration implementing the splitting itself.
Using the expanded rect is imho much more clear about the results
(positive offset values? negative obset values? i looked that up in the
kwin code ;-) and (hopefully) easier to understand since it's basically
a shadow rect aligned to the window at QPoint(0,0).
Using a parameter to define the shadow type will allow furthor
extension (Type "Popup" etc.) and avoids the setShadowFocused
"yoda-talk"
The crossfade duration should be an extra function so it can easily be
adjusted any time and keep untouched for system defaults.
Cheers,
Thomas
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic