Skip to content

Commit

Permalink
fix(naughty: icon: new, fit): use icon_size from the notification o…
Browse files Browse the repository at this point in the history
…bject if defined (fixes #3752) (#3805)

* fix(naughty: icon: new, fit): use `icon_size` from the notification object if defined (fixes #3752)

* fixup! fix(naughty: icon: new, fit): use `icon_size` from the notification object if defined (fixes #3752)

* fixup! fixup! fix(naughty: icon: new, fit): use `icon_size` from the notification object if defined (fixes #3752)
  • Loading branch information
actionless authored Aug 13, 2023
1 parent ed71b17 commit d36e132
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/naughty/widget/icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ function icon:fit(_, width, height)

local maximum = math.min(width, height)
local strategy = self._private.resize_strategy or "resize"
local optimal = math.min(beautiful.notification_icon_size or dpi(48), maximum)
local optimal = math.min(
(
self._private.notification[1] and self._private.notification[1].icon_size
) or beautiful.notification_icon_size or dpi(48),
maximum
)

local w = self._private.image:get_width()
local h = self._private.image:get_height()
Expand Down

0 comments on commit d36e132

Please sign in to comment.