I'm just experimenting with wxPython coding with wxWidgets (wxWindows) on SuSE
Linux 9.0.
However, my application looks awful - at least to my eyes. And it's not my
code - the demo apps look awful too.
The font is ugly (every font you pick looks just the same) and the general
look and feel is terrible.
My desktop is KDE so I do not have Gnome installed, but I run gtk-based apps
like Gimp and Eclipse and they look fine.
Since wxWindows on Linux is based on gtk, I assume this is because my gtk
installation isn't properly themed or set up.
So I installed a set of gtk themes. Then I found through a little bit of
googling a program called gtk-theme-switch. This excellent program allows
you to preview and apply gtk themes. The "preview" works great - I can see
all the cool themes I've got installed and they look super (except the fonts
are still iffy)
However, the "apply" doesn't seem to work because my wxWindow app still sticks
to some kind of ugly default theme and so does wxglade and the demo programs
and even gtk-theme-switch itself.
Whern I "apply" a theme in gtk-theme-switch it installs something like this in
~/.gtkrc -
# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/opt/gnome/share/themes/Birth/gtk/gtkrc"
style "user-font"
{
font="-*-Verdana-medium-r-*--*-80-90-96-p-*-iso8859-1"
}
widget_class "*" style "user-font"
include "/home/kmp/.gtkrc.mine"
# -- THEME AUTO-WRITTEN DO NOT EDIT
So it's obviously doing what it thinks will change the theme. Unfortunately,
my gtk apps do not seem to repect the settings in ~/.gtkrc
Then I found there was a function call wxWindow::SetThemeEnabled(boolean). I
tried this in my program but it made no difference.
Does anyone know how I get my python wxWidgets app themed or at least
looking as good as Gimp or Eclipse? Does wxWidgets support anti-aliasing? Are
there any tricks for getting the fonts to work better?
Best wishes
- Ken