Um... sorry for this. How embarrassing.
I found out that I should read the documentation more carefully. Flex layout means that the space is equally divided. Changed it to topdown layout, now it works.

On 24.02.2010 16:41, ElkMonster wrote:
Hello all,

I'm trying to create a wibox containing a textbox widget that spans
several lines and two textboxes below that (working as buttons). I'm not
sure I'm using the vertical layout right, so I'd be thankful if someone
could have a look. If this is not a case of wrong usage, please tell me
and I'll file a bug report.

To see the effect, have a look here and compare to the code below:
http://webuser.uni-weimar.de/~liebsch/awesome/awesome_vertical.png

The code in general looks like this:

---
local w = awful.wibox({ position="bottom", border_width = 2 })
local cal = widget({ type = "textbox", align = "left" })

cal.text = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"\nb"--\nc\nd\ne"

local next_button = widget({ type = "textbox", align = "right" })
local prev_button = widget({ type = "textbox", align = "left" })
next_button.text = "Next"
prev_button.text = "Previous"
next_button.bg = "#ff0000"
prev_button.bg = "#ff0000"

w.widgets = {
cal,
{
layout = awful.widget.layout.horizontal.rightleft,
{
layout = awful.widget.layout.horizontal.leftright,
next_button
},
{
layout = awful.widget.layout.horizontal.rightleft,
prev_button
}
},
layout = awful.widget.layout.vertical.flex
}

w.width = cal:extents().width
w.height = cal:extents().height + next_button:extents().height
---

Now, in case (a), it works as expected, but this is the case without the
line break (cal.text = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").

For (b), the text has been set to "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nb",
i.e., there is one line break. The problem is that the lower two boxes
are growing, although their heights reported by extents() are correct
(13 pixels); the wibox as a whole also seems to be sized correctly, so
the contents would fit.

(c) shows the result with the text set to
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nb\nc\nd\ne".


One single widget with multiple lines works flawlessly, by the way.

Thanks in advance,
cheers,

Sascha



--
To unsubscribe, send mail to [email protected].

Reply via email to