wibox.container.margin: Allow nonnegative dimensions

Commit f025409 avoided negative dimensions but 
also stopped allowing width and height to be zero.

For widgets like awful.widget.watch it is reasonable 
to allow dimensions to be zero because in many cases when 
the margin container is being calculated the watch widget is 
still computing and therefore has width and height zero.
This commit is contained in:
erik-f 2019-12-27 12:36:54 +01:00 committed by GitHub
parent 83ed95369c
commit 56f2fcfccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ function margin:layout(_, width, height)
local resulting_width = width - x - w
local resulting_height = height - y - h
if resulting_width > 0 and resulting_height > 0 then
if resulting_width >= 0 and resulting_height >= 0 then
return { base.place_widget_at(self._private.widget, x, y, resulting_width, resulting_height) }
end
end