awesome/lib/wibox/widget
Uli Schlachter d8f0bd13bf textbox: Actually tell pango which space we have (FS#933)
In the textbox' draw() callback we forgot to set the pango layout's width and
height. Whoops.

This was tested with the following code which makes it visible when the textbox
draws outside of its assigned space:

local w = wibox({ screen = 1 })
w.y = 10
w.x = 10
w.width = 150
w.height = 150
w.visible = true

local wi = wibox.widget.base.make_widget()
local t = wibox.widget.textbox()
t:set_markup("Foo <b>bar</b> <i>Foobar</i> und so weiter")

wi.draw = function(d, wibox, cr, width, height)
	cr:move_to(24.5, 0)
	cr:line_to(24.5, 150)
	cr:move_to(0, 24.5)
	cr:line_to(150, 24.5)
	cr:move_to(124.5, 0)
	cr:line_to(124.5, 150)
	cr:move_to(0, 124.5)
	cr:line_to(150, 124.5)
	cr:set_line_width(1)
	cr:stroke()

	cr:translate(25, 25)
	t.draw(t, wibox, cr, 100, 100)
end
w:set_widget(wi)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 19:05:25 +02:00
..
background.lua.in remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
base.lua.in remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
imagebox.lua.in remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
init.lua.in remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
systray.lua.in remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
textbox.lua.in textbox: Actually tell pango which space we have (FS#933) 2011-10-19 19:05:25 +02:00