phosphorjs / phosphor

The PhosphorJS Library
BSD 3-Clause "New" or "Revised" License
1.04k stars 169 forks source link

getting started: e.g. include logo in menubar #381

Open ernstch opened 5 years ago

ernstch commented 5 years ago

Dear phosphor developers, thank you for making this excellent library. I'd really like to use it in one of my projects, but I am stuck if I want to apply any task that is not already shown in one of the examples.

Let's take the task to include some png file, a logo, or an arbitrary HTML element in the menu bar such as JupyterLab displays its logo. The only way I find to place anything in the menu bar is "addMenu" as shown in many examples:

let menu1 = createMenu();
menu1.title.label = 'File';
let bar = new MenuBar();
bar.addMenu(menu1);

I'd need "addImage" or "addHTML" or modify the menuBar at some lower implementation level. Any hints how to achieve this? JupyterLab is too complex for me to find the relevant piece of code, I tried this already. Is there some more general design documentation of phosphor, so that I could derive a solution by myself? And finally, is this issues list the right place to ask for help with the phosphor usage?

Thank you Ernst