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

Use ttk styles; upgrade model editor #353

Open
sf-issues opened this issue Sep 20, 2012 · 7 comments
Open

Use ttk styles; upgrade model editor #353

sf-issues opened this issue Sep 20, 2012 · 7 comments
Labels
Milestone

Comments

@sf-issues
Copy link

Converted from SourceForge issue 1987998, submitted by ceball
Submit Date: 2008-06-08 08:04 GMT

Rather than local specification of e.g. bg='blue', should switch to using ttk styles.

I.e.

l = Tkinter.Label(text="Test", fg="black", bg="white")

would be more like

(setup style 'x' somewhere, then...)

l = Tkinter.Label(text="Test", style="x")

(see e.g. http://gpolo.ath.cx:81/pydoc/library/ttk.html)

Note that the only thing holding us back from using ttk widgets right now is the model editor, which contains incompatible formatting specifications.

Also note that ttk is heading for integration in the official python distribution of tkinter (see http://gpolo.ath.cx:81/projects/ttk_to_tkinter/). When the GSOC project is finished, we should switch to it from the Tile.py wrapper we're currently using.

@sf-issues
Copy link
Author

Submitted by jbednar
Date: 2008-06-10 21:46 GMT

Can you estimate how hard it would be to switch the Model Editor? Is that a big project?

@sf-issues
Copy link
Author

Submitted by ceball
Date: 2008-06-10 22:12 GMT

I think it's a small project (i.e. hours, not days). The problem, though, is that Tkinter.py in Python 2.5 (and possibly 2.6, I'm not sure) has some incompatibilities with tcl/tk 8.5, and I think these are exposed by the model editor. I suspect that, after converting the model editor code, there'd be some problems caused by Tkinter.py (and I don't know how serious they'd be).

I should really find that out for sure while the GSOC project is ongoing, so that I could possibly get the GSOC project to sort out some of the problems. (The GSOC project is progressing really fast, so I might even consider trying to use it already. Also, the GSOC project is converting IDLE to work with Tk 8.5 - currently there are some problems if you try using IDLE with Tk 8.5.)

@sf-issues
Copy link
Author

Submitted by ceball
Date: 2009-07-16 17:24 GMT

The Tkinter.py incompatibilities with tcl/tk 8.5 that I mentioned before have been corrected:
http://bugs.python.org/issue2906

Python 2.5 later than 2.5.3 includes the fixes.

Therefore, to use ttk, all we would have to do (after updating python) is install the ttk package (one is available for 2.5; Python 2.7 includes ttk) and update the model editor.

I'm incorporating #1829833 (turn model editor into a plotgroup and clean it up) with this bug, because they should be sorted out together (before release 1.0).

@jlstevens
Copy link
Member

See ioam/paramtk#2 . Is making the Tk GUI prettier still something we consider necessary for Topographica 1.0?

@jbednar
Copy link
Member

jbednar commented Sep 10, 2014

No, not necessary for 1.0. But once I get around to dealing with the tkgui #523 pull request already in place for the model editor, it would be good to make this change, because it would simplify and make it more uniform and maintainable. I don't see us having a non-Tk version of the Model Editor any time soon, and thus no way to make architecture diagrams easily...

@jbednar jbednar modified the milestones: Someday, 1.0 Sep 10, 2014
@jlstevens
Copy link
Member

In the new system, model diagrams should be generated from ModelSpecs. Some code would take in a ModelSpec and output an architecture diagram.

Not that anyone is going to do this right now...

@jbednar
Copy link
Member

jbednar commented Sep 10, 2014

Exactly.

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

No branches or pull requests

3 participants