Postings by Mathias in September 2009
Application Theming Tricks
From time to time applications need custom theming rules. Especially when the project has professional UI designers involved. So how to achieve this with GTK+?
Trivial Theming
Most easy and very wrong:
if (gdk_color_parse ("pink", &color))
gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color);
This will break and look childish as soon as your users use a custom color scheme.
Better:
static void
style_set_cb (GtkWidget *widget,
GtkStyle *old_style)
{
GtkStyle *style = gtk_widget_get_style (widget);
if (gtk_style_lookup_color (style, "SecondaryTextColor", &color))
...
Rant: Trade Imbalance Penalties
Barack Obama on CNN: "We can't go back to the era where the Chinese or the Germans or other countries just are selling everything to us, we're taking out a bunch of credit card debt or home equity loans, but we're not selling anything to them".
Found this quote when searching for stories supporting Financial Times Deutschland's story about US and UK officials ...