I did not dare to answer this question first, but since no one else sees a better answer, here is my answer "no answer":
The ActionButton API ActionButton not currently support this.
But all is not lost. You can implement this directly using the new CustomizableUI API, plus some XUL and CSS, but this is not a designated territory in general. There will be dragons; You have been warned.
If you look at the sources for buttons by default, you will find that different methods are usually used to implement such buttons:
- The Bookmark button is essentially a "normal"
<toolbarbutton type="menu-button"> with some custom styles for .toolbarbutton-menubutton-dropmarker (drop-down box) and / or .dropmarker-icon ( <image> in .toolbarbutton-menubutton-dropmarker by holding the icon of the actual dropdown icon). When the button is on the toolbar, the marker snapshot will be set to this โlistโ icon, and not to the default down arrow icon, and when everything is hidden in the palette or โhamburgerโ menu. Of course, there is an additional code that will capture the default action of the button and / or drop-down marker. - On the other hand, the Zoom controls seem to actually be three buttons in a special container with some custom styles in what basically looks like reusable classes (set via
updateCombinedWidgetStyle ). See CustomizeableWidgets , for example. on the MXR .
I would advise you to read about how to use CustomizableUI , and, of course, read the code rules and CSS of embedded widgets. Highlighting a Chrome DOM window using the DOM Inspector add-on can also help, for example. to quickly determine which CSS rules are in the game and where they come from;) The actual file / change history may also be useful.
Also, it might be a good idea to ask the SDK team to support such combination buttons in the ActionButton SDK (or create a patch for this yourself;)
nmaier
source share