From b77ffa86e02ed0ce4ce4a5e786e395871b8b17d7 Mon Sep 17 00:00:00 2001 From: Yauhen Kirylau Date: Wed, 13 Jun 2018 03:57:14 +0200 Subject: [PATCH] fix(naughty: core): don't attempt to upscale small icons (#2283) --- lib/naughty/core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/naughty/core.lua b/lib/naughty/core.lua index e2d985274..cbe596c0f 100644 --- a/lib/naughty/core.lua +++ b/lib/naughty/core.lua @@ -781,7 +781,7 @@ function naughty.notify(args) if icon then iconbox = wibox.widget.imagebox() 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(), icon:get_width()) local scaled =