From 6608b0aa1c8a89550f8d6944fdbdfd229886bc53 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 8 Jan 2013 22:06:25 +0100 Subject: [PATCH] wibox.layout.align: Give middle widget full height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I amended some change to commit 8560de597c3a1f349 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 --- lib/wibox/layout/align.lua.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wibox/layout/align.lua.in b/lib/wibox/layout/align.lua.in index 5a4766ad9..1631c68ea 100644 --- a/lib/wibox/layout/align.lua.in +++ b/lib/wibox/layout/align.lua.in @@ -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