You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The icon for a command on a toolbar throws this error:
[gtktest] Starting in dev mode...
===========================================================================
Traceback (most recent call last):
File "/home/russell/github/beeware/briefcase/venv-3.10-briefcase/lib/python3.10/site-packages/toga_gtk/app.py", line 98, in gtk_startup
self.interface._startup()
File "/home/russell/github/beeware/briefcase/venv-3.10-briefcase/lib/python3.10/site-packages/toga/app.py", line 556, in _startup
self.startup()
File "/home/russell/tmp/beeware/gtktest/src/gtktest/app.py", line 35, in startup
self.main_window.toolbar.add(cmd1)
File "/home/russell/github/beeware/briefcase/venv-3.10-briefcase/lib/python3.10/site-packages/toga/command.py", line 393, in add
self.on_change()
File "/home/russell/github/beeware/briefcase/venv-3.10-briefcase/lib/python3.10/site-packages/toga_gtk/window.py", line 82, in create_toolbar
item_impl.set_icon_widget(cmd.icon._impl.native_32)
TypeError: argument icon_widget: Expected Gtk.Widget, but got gi.overrides.GdkPixbuf.Pixbuf
Steps to reproduce
Sample app named gtktest
importtogafromtoga.styleimportPackfromtoga.style.packimportCOLUMN, ROWclassgtktest(toga.App):
defstartup(self):
stuff_group=toga.Group('Stuff', order=40)
cmd1=toga.Command(
lambda: print(self),
text='Example command',
tooltip='Tells you when it has been activated',
shortcut='k',
icon='resources/gtktest.png',
group=stuff_group,
section=0
)
self.main_window=toga.MainWindow(title=self.formal_name)
self.commands.add(cmd1)
self.main_window.toolbar.add(cmd1)
main_box=toga.Box()
self.main_window.content=main_boxself.main_window.show()
defmain():
returngtktest()
Describe the bug
The icon for a command on a toolbar throws this error:
Steps to reproduce
Sample app named
gtktest
Expected behavior
Icon renders without an error.
Screenshots
No response
Environment
0.3.16.dev278+gf732c612.d20231010
0.3.2.dev1256+gedb92eb5
Logs
briefcase.2023_10_10-16_19_32.dev.log
Additional context
Initial report: https://discord.com/channels/836455665257021440/836455665257021443/1161383265698070700
The text was updated successfully, but these errors were encountered: