0
votes

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.

1
If you ever give up on the sdk solution and want a non-sdk solution let me know. I do regular bootstrap addons. - Noitidart

1 Answers

1
votes

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]
});