Thonny plugin - incresing font size of a TreeView

44 views
Skip to first unread message

Réda Id-taleb

unread,
Jan 17, 2023, 4:43:07 PM1/17/23
to thonny
Hello,

I am developping a plugin that uses a TreeView like "Files" plugin and I want to increase the font size of its content once the user increases the font of the editor. Is it possible to do this ? I am trying but in vain, the font doesn't increase.

Thanks in advance.
Best regards,
Reda

Aivar Annamaa

unread,
Jan 23, 2023, 2:26:23 PM1/23/23
to thonny
Hi!

There's no good way to get notified about increased or decreased editor font. You could try replacing  thonny.workbench.Workbench._change_font_size with another function which first calls the original function and then updates the font size in your TreeView (see thonny.plugins.backend.pgzero_backend.patched_editor_autocomplete for an example of this approach).

Best regards
Aivar

Reply all
Reply to author
Forward
0 new messages