chrisdembia / yeadon

The human inertia model developed by Fred Yeadon in 1990.
https://pypi.python.org/pypi/yeadon
Other
29 stars 9 forks source link

GUI doesn't look so good with the wxpython backend in MayaVi #60

Open moorepants opened 11 years ago

moorepants commented 11 years ago

The background is dark and the font colors for the text are dark. Maybe there are some default settings that would make it look better.

moorepants commented 10 years ago

This is fundamentally a mayavi bug:

https://mail.enthought.com/pipermail/enthought-dev/2013-December/032710.html

moorepants commented 10 years ago

If you export this environment variable before loading yeadon you can force the GUI backend to be what you like:

export ETS_TOOLKIT='qt4'
chrisdembia commented 10 years ago

Can yeadon override the backend setting?

moorepants commented 10 years ago

If you export that environment variable then it can use an alternative backend. The default is wx (at least in Ubuntu).

moorepants commented 10 years ago

You could also set the environment variable in the software if the qt4 lib is available. But you need to check for pyqt first I guess.

moorepants commented 10 years ago

Some examples: http://docs.enthought.com/mayavi/mayavi/auto/example_qt_embedding.html

moorepants commented 10 years ago

Something like this as the top of gui.py might be good:

try:
    import pyface.qt
except ImportError:
    pass
else:
    import os
    os.environ['ETS_TOOLKIT'] = 'qt4'
moorepants commented 10 years ago

But this is not really our bug. It is a bug for MayaVi, Traits, Envisage, Ubuntu, etc.

moorepants commented 10 years ago

WX backend on Ubuntu 13.10 (screen resolution 1366 x 768):

workspace 1_027

QT4 Backend on Ubuntu 13.10 (screen resolution 1366 x 768):

workspace 1_028

Notice that the wx one looks bad and the qt does not have a maximize button, nor does it fit the screen vertically.

moorepants commented 10 years ago

These are new screenshots using Anaconda 2.0.1 on Ubuntu 14.04. yeadon human inertia model_039 yeadon human inertia model_040

Things are better for the QT version.

chrisdembia commented 10 years ago

What should we do about this?

moorepants commented 10 years ago
  1. Report bugs upstream
  2. Add some code that sets the env var if qt is available.
  3. Add a command line flag or something to the GUI() call that allows you to specify the backend for Mayavi.