@@ -175,10 +175,6 @@ function M.create_widget_item(item, is_installed, on_install)
175175 text = version_text ,
176176 color = editor .ui .COLOR .WARNING
177177 }),
178- editor .ui .label ({
179- text = " • by " .. (item .author or " Unknown" ),
180- color = editor .ui .COLOR .HINT
181- }),
182178 editor .ui .label ({
183179 text = " • " .. size_text ,
184180 color = editor .ui .COLOR .HINT
@@ -214,11 +210,8 @@ function M.create_widget_item(item, is_installed, on_install)
214210 }))
215211 end
216212
217- table.insert (widget_details_children , editor .ui .separator ({
218- orientation = editor .ui .ORIENTATION .HORIZONTAL ,
219- }))
220-
221- local widget_buttons = {
213+ -- Create button row at the bottom
214+ local button_children = {
222215 editor .ui .button ({
223216 text = " Install" ,
224217 on_pressed = on_install ,
@@ -227,36 +220,49 @@ function M.create_widget_item(item, is_installed, on_install)
227220 }
228221
229222 if item .api ~= nil then
230- table.insert (widget_buttons , editor .ui .button ({
223+ table.insert (button_children , editor .ui .button ({
231224 text = " API" ,
232225 on_pressed = function () internal .open_url (item .api ) end ,
233226 enabled = item .api ~= nil
234227 }))
235228 end
236229
237230 if item .example_url ~= nil then
238- table.insert (widget_buttons , editor .ui .button ({
231+ table.insert (button_children , editor .ui .button ({
239232 text = " Example" ,
240233 on_pressed = function () internal .open_url (item .example_url ) end ,
241234 enabled = item .example_url ~= nil
242235 }))
243236 end
244237
238+ -- Add spacer to push Author button to the right
239+ table.insert (button_children , editor .ui .horizontal ({ grow = true }))
240+
245241 if item .author_url ~= nil then
246- table.insert (widget_buttons , editor .ui .button ({
242+ table.insert (button_children , editor .ui .label ({
247243 text = " Author" ,
244+ color = editor .ui .COLOR .HINT
245+ }))
246+ table.insert (button_children , editor .ui .button ({
247+ text = item .author or " Author" ,
248248 on_pressed = function () internal .open_url (item .author_url ) end ,
249249 enabled = item .author_url ~= nil
250250 }))
251251 end
252252
253+ -- Add button row to widget details
254+ table.insert (widget_details_children , editor .ui .horizontal ({
255+ spacing = editor .ui .SPACING .SMALL ,
256+ children = button_children
257+ }))
258+
253259 return editor .ui .horizontal ({
254260 spacing = editor .ui .SPACING .NONE ,
255261 padding = editor .ui .PADDING .SMALL ,
256262 children = {
257263 -- Widget icon placeholder
258264 editor .ui .label ({
259- text = " 📦 " ,
265+ text = " ••• " ,
260266 color = editor .ui .COLOR .HINT
261267 }),
262268
@@ -266,13 +272,6 @@ function M.create_widget_item(item, is_installed, on_install)
266272 grow = true ,
267273 children = widget_details_children
268274 }),
269-
270- -- Action buttons
271- editor .ui .vertical ({
272- spacing = editor .ui .SPACING .MEDIUM ,
273- grow = true ,
274- children = widget_buttons
275- }),
276275 }
277276 })
278277end
284283--- @return userdata - UI component
285284function M .create_widget_list (items , on_install )
286285 local widget_items = {}
287- local install_folder = installer .get_install_folder ()
286+ local install_folder = editor . prefs . get ( " druid.asset_install_folder " ) or installer .get_install_folder ()
288287
289288 for _ , item in ipairs (items ) do
290289 local is_installed = installer .is_widget_installed (item , install_folder )
0 commit comments