Live data from Hacker News

Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

github.com

1–10 of 38 posts

Re: Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

#2
Neat! I can see this being a useful way to build quick demos from a Figma design, not sure I would use it for proper apps though.

If I follow correctly, it's building the whole UI from images from the Figma file, so isn't using any native OS styling. Thats fine for demos and some simple apps.

It would be interesting if it was possible to combine this with BeeWhare [0] for mobile UIs, mobile is much more forgiving with none native style. I wander if it could be modified to output BeeWhare/Toga code.

0: https://beeware.org

Re: Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

#4
post #3

I find chatgpt good for this kind of simple GUI design tasks, you can just tell it to create a simple GUI incl drop downs etc. It won’t be perfect but removes a lot of the tedious work.

How do you maintain the generated code? Once you make changes to it, you can't regenerate it without losing the changes.

Re: Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

#5
Pretty impressive. I've never very much liked how TKinter looks out of the box and i didn't know it's capable custom UI visuals as in the examples. If tkinter looked like the OS native UI it would be optimal, but in my experience it mostly doesn't. Will be following this project for my future GUI needs in Python. Nice work!

Re: Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

#6
post #5

Pretty impressive. I've never very much liked how TKinter looks out of the box and i didn't know it's capable custom UI visuals as in the examples. If tkinter looked like the OS native UI it would be optimal, but in my experience it mostly doesn't. Will be following this project for my future GUI needs in Python. Nice work!

See also https://github.com/rdbende/Sun-Valley-ttk-theme (couple more themes are linked at the end of readme)

Re: Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

#7
post #4
post #3

I find chatgpt good for this kind of simple GUI design tasks, you can just tell it to create a simple GUI incl drop downs etc. It won’t be perfect but removes a lot of the tedious work.

How do you maintain the generated code? Once you make changes to it, you can't regenerate it without losing the changes.

I just use it to create the initial layout and then if I need anything additional I just ask chatgpt to create it. You still have to know what you’re doing but I find that GUI code is mostly boilerplate code that is really tedious to create from scratch. ChatGPT is a 5x productivity boost.

Re: Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

#8
Our company made the switch to QT, dev time and code readability has improved, but the code runs significantly slower in debug mode. (Yes I know we can run headless)

Sad because I learned so much tkinter, and despite that, I'm fine with moving away from tkinter. I'm not sure who the problem is.

Re: Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

#9

Our company made the switch to QT, dev time and code readability has improved, but the code runs significantly slower in debug mode. (Yes I know we can run headless) Sad because I learned so much tkinter, and despite that, I'm fine with moving away from tkinter. I'm not sure who the problem is.

Have you tried QML? My efficiency improved dramatically since switching from C++ Qt for the UI.

Re: Tkinter Designer: Quickly Turn Figma Design to Python Tkinter GUI

#10
post #5

Pretty impressive. I've never very much liked how TKinter looks out of the box and i didn't know it's capable custom UI visuals as in the examples. If tkinter looked like the OS native UI it would be optimal, but in my experience it mostly doesn't. Will be following this project for my future GUI needs in Python. Nice work!

Tkinter looks native on platforms that have native GUIs (Windows, macOS). On Unix you can use any of the numerous platform-independent (non-native) skins for Ttk:

- https://ttkbootstrap.readthedocs.io/en/latest/#sample-themes

- https://wiki.tcl-lang.org/page/List+of+ttk+Themes#60ca3eb80e...

- https://ttkthemes.readthedocs.io/en/latest/themes.html

The main issue with Tk/Ttk is mostly documentation and of course that it's a classic GUI framework, not a 3D-GPU-layer-based framework suitable for highly animated and composited UIs.

There's a bunch of stuff that you really wanna know about but simply isn't included in the Python docs, and the real API docs are for Tcl and you need to understand how those tclisms map over to Python.

Post reply on HN