Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need more detail about PopupImageMenuItem #4

Open
eexpress opened this issue Dec 28, 2021 · 1 comment
Open

Need more detail about PopupImageMenuItem #4

eexpress opened this issue Dec 28, 2021 · 1 comment

Comments

@eexpress
Copy link

I test the PopupImageMenuItem, below is work.

let item0 = new PopupMenu.PopupImageMenuItem('xxxx', stock_icon.icon_name);

But I want do some adjust, so I write like this, but it fail. I can not found document about PopupImageMenuItem. https://gjs-docs.gnome.org/ no help.

let item0 = new PopupMenu.PopupImageMenuItem({text: 'xxxx', icon_name: stock_icon.icon_name, style_class: 'big_text', icon_size: 32});

plz help.

@ferdnyc
Copy link

ferdnyc commented Nov 26, 2023

It's a couple of years later, but now there's https://gjs.guide/ which has more documentation on writing in an extension context.

Specifically, for PopupImageMenuItem, its constructor is documented as taking three arguments: text, icon, and params. So instead of your code you'd call it as,

let item0 = new PopupMenu.PopupImageMenuItem(
    'xxxx', stock_icon.icon_name, {style_class: 'big_text', icon_size: 32});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants