There is a need to set button attributes like height and width when calling add_button.
Proposed Change
Allow the add_button method to accept additional arguments for button attributes such as height and width.
Example Implementation
I have included a small patch below to illustrate the changes made locally. Note that this is not a definitive proposal but an example of what works for my use case.
Summary
This issue report addresses two key points:
UIButtonRow
class with acallback
argument.add_button
.If needed, I can split these into separate issues based on our discussion.
Bug Report
System Info
Arcade 3.0.0.dev27
vendor: Intel renderer: Mesa Intel(R) HD Graphics 530 (SKL GT2) version: (4, 6) python: 3.11.9 (main, Jun 17 2024, 15:35:00) [GCC 13.2.1 20240210] platform: linux pyglet version: 2.1.dev2 PIL version: 10.2.0
Description
Instantiating the
UIButtonRow
class with thecallback
argument raises aTypeError
.Actual Behavior
When using the
callback
argument, the following error occurs:Expected Behavior
Instantiating the
UIButtonRow
class with acallback
argument should assign the callback toself.on_action
.Steps to Reproduce
Enhancement Request
Description
There is a need to set button attributes like height and width when calling
add_button
.Proposed Change
Allow the
add_button
method to accept additional arguments for button attributes such as height and width.Example Implementation
I have included a small patch below to illustrate the changes made locally. Note that this is not a definitive proposal but an example of what works for my use case.