Themes and Panels
Aaron J. Seigo
aseigo at kde.org
Fri Mar 21 23:01:48 CET 2008
On Friday 21 March 2008, Ivan Čukić wrote:
> - PanelSvg to have an option of adding a prefix for elements - something as
> void setPrefix(const QString & prefix) (and getter respectively)
> thus making it more versatile (if, in the future, someone needs more than
> just sides of the world) - this is the way I already did in Lancelot and
> it proved to be beneficial.
... which removes the idea of standardization. it may be fine to add this to
PanelSvg itself so that applets that wish to deviate into their own little
world can do so (again, i think that in most cases that's a mistake; i can
imagine cases it's not, though) but we will still need to offer _standard_
prefixes that require no knoweldge on the part of the coder.
if every bit of code literally puts in "east" for the left edge, all it takes
is:
* someone typing it in wrong (no compiler check)
* the theme format changing
and we have problems. we already rely on the theme creator to get the naming
right (at least right now, in an age where creating themes is 100% manual)
let's not extend that further than necessary to the other side of the fence,
imo.
by providing a set of Well Known names behind an enum (and we already have,
e.g. Qt::CompassDirection as well as a few others in the Plasma namespace)
we'll help keep code cleaner and future proof.
so, i counter your proposal with:
- PanelSvg to have an option of adding a prefix for elements - something as
void setPrefix(const QString & prefix) (and getter respectively)
thus making it more versatile (if, in the future, someone needs more than
just sides of the world) - this is the way I already did in Lancelot and
it proved to be beneficial.
- PanvelSvg to have an option of defining the Plasma::Location via a
setLocation(Plasma::Location) and Plasma::Location location() const; method
pair; internally, it will map the location to the right prefix(es), setting
it with the above setPrefix(const QString&) method
- PanelContainment will call setLocation in constraintsUpdated on
LocationConstraint
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080321/240bae50/attachment.pgp
More information about the Panel-devel
mailing list