ospalh / anki-addons

A collection of Anki 2.1 addons in different states of bugginess, up-to-dateness and usefulness.
http://ospalh.github.io/anki-addons/
135 stars 60 forks source link

Add support for multiple button rows #104

Closed glutanimate closed 7 years ago

glutanimate commented 7 years ago

This patch adds the ability to define multiple rows of buttons in the "Quick Note and Deck Buttons" Add-on. I've tried to stay as close as possible to the original implementation, but I had to monkey-patch the init methods of the two choosers to update the widget layout.

The button definition syntax is now a list of lists, where each list represents a row of buttons defined as dictionaries. If the button definitions are provided in the old syntax, the add-on automatically falls back to a single row.

Other changes included in this patch:


Thanks again for all of your work on these add-ons! They've made my day-to-day Anki use much easier.

ospalh commented 7 years ago

Looks like a nice idea, thanks. I am not totally happy with this, but will pull this anyway, as it is an improvement. You can look at the next commits to see what i didn’t like. 😳

glutanimate commented 7 years ago

Thanks for merging this and thanks also for your thoughtful changes!