Amarok 2 containment positioning problems
Aaron J. Seigo
aseigo at kde.org
Sun Nov 9 20:50:22 CET 2008
On Sunday 09 November 2008, Mark Kretschmann wrote:
> since bumping libplasma in Amarok recently we have been experiencing
> problems with our containment layout. The problem becomes visible if
> you zoom out of the containment: Instead of a grid of 2x2, Amarok now
> shows all containments in one row, which hides some of the
> containments due to lack of space.
the naive and obvious patch is attached: it moves
Containment::positionContainment to Corona::layoutContainments. it's BIC as it
introduces a new virtua method, but it would allow you to override the
layouting.
what i don't like about the patch:
* it's a new virtual method
* it doesn't take panels into consideration (not important for amarok2, at
least at this time)
* it relies still on Containment calling the method at the right time ...
so many ungood things.
what i *think* we should probably do instead is get rid of all the positioning
code in Containment and instead create a QGraphicsLayout (or similar class?)
that handles this.
then if you wanted to customze the layout strategy, you just change the
layout. in Corona::Corona we could do something like:
if (!layout()) {
new DefaultCoronaLayout(this);
}
which would allow Corona subclasses the opportunity to register their own
layout class in the subclass' constructor and avoid the overhead of
DefaultCoronaLayout being unecessarily created.
what would this layout class need to do?
* handle off-screen widgets
* handle panel containments
* handle desktop (that name is just so bad now =) containments
* adjust layout whenever a managed item changes size or position
i don't think this is something for 4.2, though. it's great research work for
4.3, imho. in fact, in my 4.3 kjots book there's already an entry for this
issue.
in the meantime i'm fine with changing the default from 4 containments across
to 2 containments across. i've even made that change in svn now. =)
--
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 Qt Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: containment_layout_in_corona.diff
Type: text/x-patch
Size: 8408 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081109/cb83a903/attachment.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081109/cb83a903/attachment.sig
More information about the Plasma-devel
mailing list