On Fri, 2006-05-05 at 21:08 +0100, Alex Bligh wrote:
Thanks to Mart Raudsepp, I have put in some code in wxXtra which
customizes how wxWidgets uses sliders. Specifically it customizes
them not have suge humungously large thumbs on some themes.
Mart even had it working with extremely thin thumbs, though
a couple of themes (notably Ubuntu Human, sadly) don't work that
well with thumbs any smaller than the current ones.
Ubuntu Human in dapper should be fixed now by the author. He received
some beating from my part ;)
Clearlooks in gtk-engines-2.7.x (the version using cairo, will be
default in GNOME-2.16, and many distros already use it by default in
2.14) should cope with various slider thumb sizes now in HEAD too.
The great thing about this technique is we /should/ be able to
use it to override theme style on a number of different controls.
We may even be able to detect buggy themes and fix them.
It turns out it is kind of possible to detect what theme is currently
used with this:
gchar *theme_name;
g_object_get (gtk_settings_get_default(),
"gtk-theme-name", &theme_name, NULL);
printf ("Theme name: %s\n", theme_name);
g_free (theme_name);
This should return a string that describes the theme used. This is often
the name of the directory in /usr/share/themes, e.g "Clearlooks".
If there's a GtkWidget available (such as GetHandle on the slider), then
gtk_settings_get_for_screen(gtk_widget_get_screen(slider->GetHandle()))
might be better, instead of gtk_settings_get_default()
Ideally themes would get fixed to cope with special use-cases like
these.
I can prod some people to get to that when cases are identified, or file
my own patches when necessary.
I have hopes we may be able to use Mart's technique to fix double
decker text controls (finally).
--
With regards,
Mart Raudsepp
Project manager of wxMUD - http://wxmud.sourceforge.net/
Developer of wxWidgets - http://www.wxwidgets.org/
GTK+ port maintainer of OMGUI - http://www.omgui.org/