wibox.layout.align: Give middle widget full height

I amended some change to commit 8560de597c which made the align layout's
middle widget really centered instead of being way too wide. However, this also
shrunk the widget on the "other" axis, too. This commit fixes that up.

A big "sorry" to Lukáš for breaking his patch.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2013-01-08 22:06:25 +01:00
parent 23fe017bd4
commit 6608b0aa1c
1 changed files with 2 additions and 2 deletions

View File

@ -59,12 +59,12 @@ function align:draw(wibox, cr, width, height)
w, h = width, size_limit - size_first - size_third
local real_w, real_h = self.second:fit(w, h)
x, y = 0, size_first + h / 2 - real_h / 2
w, h = real_w, real_h
h = real_h
else
w, h = size_limit - size_first - size_third, height
local real_w, real_h = self.second:fit(w, h)
x, y = size_first + w / 2 - real_w / 2, 0
w, h = real_w, real_h
w = real_w
end
base.draw_widget(wibox, cr, self.second, x, y, w, h)
end