fix: don't render empty title (#319)

This commit is contained in:
christoph-heinrich
2022-10-12 08:43:12 +02:00
committed by GitHub
parent 2c4cfd70ee
commit 34b9b59603

View File

@@ -3239,8 +3239,8 @@ function TopBar:render()
end
-- Title
if max_bx - title_ax > self.font_size * 3 then
local text = state.title or 'n/a'
local text = state.title
if max_bx - title_ax > self.font_size * 3 and text and text ~= '' then
local bx = math.min(max_bx, title_ax + text_width_estimate(text, self.font_size) + padding * 2)
local by = self.by - bg_margin
ass:rect(title_ax, title_ay, bx, by, {