[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: [Panel-devel] [PATCH] Layout Code Update
From: "Leo Franchi" <lfranchi () gmail ! com>
Date: 2007-08-16 17:53:03
Message-ID: c5793d500708161053y620e8b18w9b84a4f73cca4673 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On 8/16/07, Percy Leonhardt <mailings@eris23.de> wrote:
>
> On Wednesday 15 August 2007, Leo Franchi wrote:
> > i'm achieving a gridlayout-like thing by combining a HBoxLayout with
> > multiplel VBoxLayout children. it works pretty well overall :)
>
> This seems to be a copy&paste bug:
>
> Index: hboxlayout.cpp
> ===================================================================
> --- hboxlayout.cpp (revision 700011)
> +++ hboxlayout.cpp (working copy)
> @@ -81,7 +81,7 @@
>
> qreal expandWidth = 0;
> if (expandingChildren.count() > 0) {
> - expandWidth = (available.height() - ((expandingChildren.count()
> - 1) * spacing())) / e
> xpandingChildren.count();
> + expandWidth = (available.width() - ((expandingChildren.count()
> - 1) * spacing())) / ex
> pandingChildren.count();
> }
>
> foreach (LayoutItem *l, expandingChildren) {
>
> Without this change HBoxLayout won't work for me. Ok to commit?
>
> And still I cannot get the layout working for a grid of labels. If I do
> not
> set the text of the labels directly when creating the layout there is not
> enough room allocated for the labels afterwards.
>
> Could you show me some example (or real) code with a working gridlayout?
Sure. I'm not actually working on a Plasma applet. I'm the guy integrating
libplasma into Amarok 2.0, so my layout is actually the layout manager for
the whole contextview (plasma-like area).
since we have slightly different needs from plasma, i actually extended
HBoxLayout with custom layouting code, but if you want to take a look, its
here:
http://websvn.kde.org/trunk/extragear/multimedia/amarok/src/context/ColumnApplet.h?view=markup
http://websvn.kde.org/trunk/extragear/multimedia/amarok/src/context/ColumnApplet.cpp?view=markup
best,
leo
Thanks and bye,
>
> Percy
> _______________________________________________
> Panel-devel mailing list
> Panel-devel@kde.org
> https://mail.kde.org/mailman/listinfo/panel-devel
>
--
______________________________________________________
Leo Franchi angel666@myrealbox.com
4305 Charlemagne Ct lfranchi@gmail.com
Austin cell: (650) 704 3680
TX, USA home: (650) 329 0125
[Attachment #5 (text/html)]
On 8/16/07, <b class="gmail_sendername">Percy Leonhardt</b> <<a \
href="mailto:mailings@eris23.de">mailings@eris23.de</a>> wrote:<div><span \
class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px \
solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> On \
Wednesday 15 August 2007, Leo Franchi wrote:<br>> i'm achieving a \
gridlayout-like thing by combining a HBoxLayout with<br>> multiplel VBoxLayout \
children. it works pretty well overall :)<br><br>This seems to be a copy&paste \
bug: <br><br>Index: hboxlayout.cpp<br>===================================================================<br>--- \
hboxlayout.cpp (revision 700011)<br>+++ hboxlayout.cpp (working copy)<br>@@ -81,7 \
+81,7 @@<br><br> qreal expandWidth = 0; <br> if \
(expandingChildren.count() > 0) {<br>- expandWidth = (available.height() - \
((expandingChildren.count()<br>- 1) * spacing())) / \
e<br>xpandingChildren.count();<br>+ expandWidth = (available.width() - \
((expandingChildren.count ()<br>- 1) * spacing())) / \
ex<br>pandingChildren.count();<br> }<br><br> foreach \
(LayoutItem *l, expandingChildren) {<br><br>Without this change HBoxLayout won't \
work for me. Ok to commit?<br><br>And still I cannot get the layout working for a \
grid of labels. If I do not <br>set the text of the labels directly when creating the \
layout there is not<br>enough room allocated for the labels afterwards.<br><br>Could \
you show me some example (or real) code with a working gridlayout?</blockquote> \
<div><br><br>Sure. I'm not actually working on a Plasma applet. I'm the guy \
integrating libplasma into Amarok 2.0, so my layout is actually the layout \
manager for the whole contextview (plasma-like area).<br><br> since we have slightly \
different needs from plasma, i actually extended HBoxLayout with custom layouting \
code, but if you want to take a look, its here:<br><br><a \
href="http://websvn.kde.org/trunk/extragear/multimedia/amarok/src/context/ColumnApplet.h?view=markup">
http://websvn.kde.org/trunk/extragear/multimedia/amarok/src/context/ColumnApplet.h?view=markup</a><br><a \
href="http://websvn.kde.org/trunk/extragear/multimedia/amarok/src/context/ColumnApplet \
.cpp?view=markup">http://websvn.kde.org/trunk/extragear/multimedia/amarok/src/context/ColumnApplet.cpp?view=markup
</a><br><br>best,<br>leo<br></div><br><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;">Thanks and \
bye,<br><br> Percy<br>_______________________________________________
<br>Panel-devel mailing list<br><a \
href="mailto:Panel-devel@kde.org">Panel-devel@kde.org</a><br><a \
href="https://mail.kde.org/mailman/listinfo/panel-devel">https://mail.kde.org/mailman/listinfo/panel-devel</a><br></blockquote>
</div><br><br clear="all"><br>-- \
<br>______________________________________________________<br>Leo \
Franchi <a \
href="mailto:angel666@myrealbox.com">angel666@myrealbox.com</a><br>4305 Charlemagne \
Ct <a \
href="mailto:lfranchi@gmail.com">lfranchi@gmail.com</a> \
<br>Austin &nbs \
p; \
cell: (650) 704 3680<br>TX, \
USA   \
; home: \
(650) 329 0125
_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic