[traits][WX] Ugly look of traits UIs on ubuntu 10.04

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[traits][WX] Ugly look of traits UIs on ubuntu 10.04

Uche Mennel
  Hi All

With version 10.04, Ubuntu got a new face-lift which has a very
unpleasant impact on traits UIs. For some reason, the system's menubar
color, which has now changed to dark grey, has been used as default
background color for the GUI masks. The resulting GUIs look very ugly to
me (see attached screenshot with ETS 3.5.0, wxPython-2.8.11.0 ). Is
there an easy way to reset the traits colors to the default system
colors? And why the defaults have ever been changed?

Regards
Uche



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

traits_ui_ubuntu.png (58K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [traits][WX] Ugly look of traits UIs on ubuntu 10.04

Eraldo Pomponi
Dear Uche, 

if you also don't like this look for your Ubuntu installation, it is enough to change 
the theme (As I did), for example moving to Clearlooks. 
TraisUI based GUI will use it so you should obtain something acceptable (in my opinion).

Cheers, 
Eraldo 

 

On Wed, Feb 2, 2011 at 1:56 PM, Uche Mennel <[hidden email]> wrote:
 Hi All

With version 10.04, Ubuntu got a new face-lift which has a very unpleasant impact on traits UIs. For some reason, the system's menubar color, which has now changed to dark grey, has been used as default background color for the GUI masks. The resulting GUIs look very ugly to me (see attached screenshot with ETS 3.5.0, wxPython-2.8.11.0 ). Is there an easy way to reset the traits colors to the default system colors? And why the defaults have ever been changed?

Regards
Uche



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [traits][WX] Ugly look of traits UIs on ubuntu 10.04

bryce hendrix-2
In reply to this post by Uche Mennel
On Wed, Feb 2, 2011 at 6:56 AM, Uche Mennel <[hidden email]> wrote:
 Hi All

With version 10.04, Ubuntu got a new face-lift which has a very unpleasant impact on traits UIs. For some reason, the system's menubar color, which has now changed to dark grey, has been used as default background color for the GUI masks. The resulting GUIs look very ugly to me (see attached screenshot with ETS 3.5.0, wxPython-2.8.11.0 ). Is there an easy way to reset the traits colors to the default system colors? And why the defaults have ever been changed?


Uche,

We're using what wx thinks are the system colors. Long ago we had a hard coded palatte, but that was replaced with an attempt to stick as close to the system colors as possible. Wx isn't particularly good about mapping the colors however, and there is a chance we're using the wrong component to base the color off of. If I get a chance, I'll dig into the wx backend code, but its a pretty low priority at the moment since I don't have a stock 10.4 install handy and any change needs to be tested on 3 platforms, and using light and dark colored themes on Ubuntu in addition to their stock theme.

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [traits][WX] Ugly look of traits UIs on ubuntu 10.04

John Wiggins
Bryce,
Here's what we have in traits.ui.wx.constants:
WindowColor = wx.SystemSettings_GetColour( wx.SYS_COLOUR_MENUBAR )
When I run that from ipython on my 10.04 VM, I get wx.Colour(60, 59, 55, 255) which is strange because that's the correct color.
In fact, looking at all the calls to wx.SystemSettings_GetColour in the traits ui code doesn't turn up any constant that returns the color Uche is seeing: (240, 235, 226, 255). (I checked SYS_COLOUR_3DSHADOW, SYS_COLOUR_3DHIGHLIGHT, SYS_COLOUR_BTNSHADOW, SYS_COLOUR_BTNHILIGHT, SYS_COLOUR_BTNHIGHLIGHT, and SYS_COLOUR_MENUBAR)
Color me confused.

- John

On Wed, Feb 2, 2011 at 9:32 AM, bryce hendrix <[hidden email]> wrote:
On Wed, Feb 2, 2011 at 6:56 AM, Uche Mennel <[hidden email]> wrote:
 Hi All

With version 10.04, Ubuntu got a new face-lift which has a very unpleasant impact on traits UIs. For some reason, the system's menubar color, which has now changed to dark grey, has been used as default background color for the GUI masks. The resulting GUIs look very ugly to me (see attached screenshot with ETS 3.5.0, wxPython-2.8.11.0 ). Is there an easy way to reset the traits colors to the default system colors? And why the defaults have ever been changed?


Uche,

We're using what wx thinks are the system colors. Long ago we had a hard coded palatte, but that was replaced with an attempt to stick as close to the system colors as possible. Wx isn't particularly good about mapping the colors however, and there is a chance we're using the wrong component to base the color off of. If I get a chance, I'll dig into the wx backend code, but its a pretty low priority at the moment since I don't have a stock 10.4 install handy and any change needs to be tested on 3 platforms, and using light and dark colored themes on Ubuntu in addition to their stock theme.

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [traits][WX] Ugly look of traits UIs on ubuntu 10.04

bryce hendrix-2
On Wed, Feb 2, 2011 at 7:44 AM, John Wiggins <[hidden email]> wrote:
Bryce,
Here's what we have in traits.ui.wx.constants:
WindowColor = wx.SystemSettings_GetColour( wx.SYS_COLOUR_MENUBAR )
When I run that from ipython on my 10.04 VM, I get wx.Colour(60, 59, 55, 255) which is strange because that's the correct color.
In fact, looking at all the calls to wx.SystemSettings_GetColour in the traits ui code doesn't turn up any constant that returns the color Uche is seeing: (240, 235, 226, 255). (I checked SYS_COLOUR_3DSHADOW, SYS_COLOUR_3DHIGHLIGHT, SYS_COLOUR_BTNSHADOW, SYS_COLOUR_BTNHILIGHT, SYS_COLOUR_BTNHIGHLIGHT, and SYS_COLOUR_MENUBAR)
Color me confused.

- John


Welcome to Pyface/TraitsUI development John! :)

Of course, there are 2 places the color needs to be set. The one in enthought/traits/ui/wx/constants.py  and another in enthought/pyface/ui/wx/system_metrics.py

Unfortunately WX_COLOUR_WINDOW isn't the right color (but closer in this case). Here are the best docs I could find quickly with all of the color choices (notice, its a Ruby site. The wxPython docs are terrible in most cases, this one is no exception):


Maybe the solution is to use the qt backend, where everything looks fine?

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [traits][WX] Ugly look of traits UIs on ubuntu 10.04

Uche Mennel
  Bryce,

There is also wx.NullColor, which passes the choice of color to WX.
According to the attached screenshot which i recently made  on my ubuntu
box, WX (2.8.11) seems to do the right job with choosing colors. At
least it looks like a native Gnome window to me. A characteristic of WX
is that it tries to look as native as possible and therefore system
colors strongly depend on the current platform. I'd say if you
explicitly override some system colors it is very likely that there is a
platform where it looks annoying and which is indeed confusing. This
might work better with Qt. Anyway, I still don't understand why you
don't want to keep just the default colors, by simply don't touching
them ...

Uche


On 02.02.2011 23:58, bryce hendrix wrote:

> On Wed, Feb 2, 2011 at 7:44 AM, John Wiggins <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Bryce,
>     Here's what we have in traits.ui.wx.constants:
>     WindowColor = wx.SystemSettings_GetColour( wx.SYS_COLOUR_MENUBAR )
>     When I run that from ipython on my 10.04 VM, I get wx.Colour(60,
>     59, 55, 255) which is strange because that's the correct color.
>     In fact, looking at all the calls to wx.SystemSettings_GetColour
>     in the traits ui code doesn't turn up any constant that returns
>     the color Uche is seeing: (240, 235, 226, 255). (I checked
>     SYS_COLOUR_3DSHADOW, SYS_COLOUR_3DHIGHLIGHT, SYS_COLOUR_BTNSHADOW,
>     SYS_COLOUR_BTNHILIGHT, SYS_COLOUR_BTNHIGHLIGHT, and
>     SYS_COLOUR_MENUBAR)
>     Color me confused.
>
>     - John
>
>
> Welcome to Pyface/TraitsUI development John! :)
>
> Of course, there are 2 places the color needs to be set. The one in
> enthought/traits/ui/wx/constants.py  and another in
> enthought/pyface/ui/wx/system_metrics.py
>
> Unfortunately WX_COLOUR_WINDOW isn't the right color (but closer in
> this case). Here are the best docs I could find quickly with all of
> the color choices (notice, its a Ruby site. The wxPython docs are
> terrible in most cases, this one is no exception):
>
> http://wxruby.rubyforge.org/doc/systemsettings.html
>
> Maybe the solution is to use the qt backend, where everything looks fine?
>
> Bryce
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

simple_app_ubuntu.png (114K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [traits][WX] Ugly look of traits UIs on ubuntu 10.04

bryce hendrix-2


On Thu, Feb 3, 2011 at 2:57 AM, Uche Mennel <[hidden email]> wrote:
 Bryce,

There is also wx.NullColor, which passes the choice of color to WX. According to the attached screenshot which i recently made  on my ubuntu box, WX (2.8.11) seems to do the right job with choosing colors. At least it looks like a native Gnome window to me. A characteristic of WX is that it tries to look as native as possible and therefore system colors strongly depend on the current platform. I'd say if you explicitly override some system colors it is very likely that there is a platform where it looks annoying and which is indeed confusing. This might work better with Qt. Anyway, I still don't understand why you don't want to keep just the default colors, by simply don't touching them ...

Uche



Uche,

There is a fair amount (6000 lines total) of code to do something like the AUI Notebook (which doesn't handle color correctly either). TraitsUI on wx is actually drawing a lot of the window code itself, not using wx. This allows for dragging of tabs, docking, and some other features, but has obvious downsides too. I'll try using wx.NullColour & see how that works.

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev