Fixed error when base_size is not set

This commit is contained in:
Fekete, Zoltán 2023-10-03 07:14:30 +02:00 committed by Zoltan Fekete
parent fa432e771a
commit 9301c491d2
1 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,10 @@ function systray:draw(context, cr, width, height)
local cols = math.ceil(num_entries / rows)
local bg = beautiful.bg_systray or beautiful.bg_normal or "#000000"
local spacing = beautiful.systray_icon_spacing or 0
local y_offset = ((height - base_size) / 2) - 1
local y_offset = 0
if base_size then
y_offset = ((height - base_size) / 2) - 1
end
if context and not context.wibox then
error("The systray widget can only be placed inside a wibox.")