Reputation: 19
How to add a toolbar using firefox add-ons SDK ?
I tried to bring the same effect by adding a widget and attaching a panel to it,but also it does not support floating panels,and also the panel is displayed above scree (hiding the scree content). I want to display a toolbar with some content in it.
Upvotes: 0
Views: 636
Reputation: 16558
Use the sdk/ui/toolbar
Example:
var { ActionButton } = require('sdk/ui/button/action');
var { Toolbar } = require("sdk/ui/toolbar");
var { Frame } = require("sdk/ui/frame");
var previous = ActionButton({
id: "previous",
label: "previous",
icon: "./icons/previous.png"
});
var next = ActionButton({
id: "next",
label: "next",
icon: "./icons/next.png"
});
var play = ActionButton({
id: "play",
label: "play",
icon: "./icons/play.png"
});
var frame = new Frame({
url: "./frame-player.html"
});
var toolbar = Toolbar({
title: "Player",
items: [previous, next, play, frame]
});
Upvotes: 1