Skip to content

qt: various fixes in the custom button, and ability to hide the text

This is inspired from a6f0f676.

The important thing is that the control must be flexible, and adjust itself properly for any reasonable size given to it.

This means making sure that when there is not enough size, text elision is done, and when there is more than enough size, proper alignment is done.

I was hesitant about introducing showText, as I initially thought we could automatically show the text with text.length > 0 and set the text empty when we don't want text displayed instead, but that meant the tool tip would be empty too (which we don't want).

I also deprecated selected in favor of checked, and made the icon not displayed when busy indicator is shown.

I have noted a potential use case of only showing icon in !7485 (comment 493892). In here, I only do it in ArtistTopBanner, but there are more potential cases.

Merge request reports

Loading