fix(naughty: core): don't attempt to upscale small icons (#2283)

This commit is contained in:
Yauhen Kirylau 2018-06-13 03:57:14 +02:00 committed by Emmanuel Lepage Vallée
parent 619d922538
commit b77ffa86e0
1 changed files with 1 additions and 1 deletions

View File

@ -781,7 +781,7 @@ function naughty.notify(args)
if icon then if icon then
iconbox = wibox.widget.imagebox() iconbox = wibox.widget.imagebox()
iconmargin = wibox.container.margin(iconbox, margin, margin, margin, margin) iconmargin = wibox.container.margin(iconbox, margin, margin, margin, margin)
if icon_size then if icon_size and (icon:get_height() > icon_size or icon:get_width() > icon_size) then
local scale_factor = icon_size / math.max(icon:get_height(), local scale_factor = icon_size / math.max(icon:get_height(),
icon:get_width()) icon:get_width())
local scaled = local scaled =