customizable popup width

This commit is contained in:
Artem Tarasov 2024-05-20 19:58:40 +02:00
parent 2e422691d2
commit 182f80349d
1 changed files with 4 additions and 3 deletions

View File

@ -188,6 +188,7 @@ local function worker(user_args)
local play_icon = args.play_icon or path_to_icons .. "/symbolic/actions/media-playback-start-symbolic.svg" local play_icon = args.play_icon or path_to_icons .. "/symbolic/actions/media-playback-start-symbolic.svg"
local stop_icon = args.stop_icon or path_to_icons .. "/symbolic/actions/media-playback-stop-symbolic.svg" local stop_icon = args.stop_icon or path_to_icons .. "/symbolic/actions/media-playback-stop-symbolic.svg"
local library_icon = args.library_icon or path_to_icons .. "/symbolic/places/folder-music-symbolic.svg" local library_icon = args.library_icon or path_to_icons .. "/symbolic/places/folder-music-symbolic.svg"
local popup_width = args.popup_width or 300
local icon = wibox.widget { local icon = wibox.widget {
widget = wibox.widget.imagebox, widget = wibox.widget.imagebox,
@ -230,7 +231,7 @@ local function worker(user_args)
local cover_art_widget = wibox.widget { local cover_art_widget = wibox.widget {
widget = wibox.widget.imagebox, widget = wibox.widget.imagebox,
forced_height = 0, forced_height = 0,
forced_width = 300, forced_width = popup_width,
resize_allowed = true, resize_allowed = true,
} }
@ -238,7 +239,7 @@ local function worker(user_args)
widget = wibox.widget.textbox, widget = wibox.widget.textbox,
font = font, font = font,
forced_height = 100, forced_height = 100,
forced_width = 300, forced_width = popup_width,
} }
local update_metadata = function(meta) local update_metadata = function(meta)
@ -253,7 +254,7 @@ local function worker(user_args)
if art_url ~= nil and art_url ~= "" then if art_url ~= nil and art_url ~= "" then
cover_art_widget.image = art_url cover_art_widget.image = art_url
cover_art_widget.forced_height = 300 cover_art_widget.forced_height = popup_width
else else
cover_art_widget.image = nil cover_art_widget.image = nil
cover_art_widget.forced_height = 0 cover_art_widget.forced_height = 0