Changing background color of text in statusbar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've been trying to change the background colour for the text dispalyed in a statusbar, but I don't get it as I want it!

I simply want the background of the text to be red, but it seems to be quite difficult - or I've just missed something. (Probably the later :-)

I've tried a lot of things including use of 'private' variables in the GtkStatusbar structure!

The following sample code gives me a red frame and a little red square to the right in the statusbar - not quite what I want!



Sample code:
gtk_widget_modify_bg(active_statusbar, GTK_STATE_NORMAL, &red);
gtk_widget_modify_bg(active_statusbar, GTK_STATE_ACTIVE, &red);
gtk_widget_modify_bg(active_statusbar, GTK_STATE_PRELIGHT, &red);
gtk_widget_modify_bg(active_statusbar, GTK_STATE_SELECTED, &red);
gtk_widget_modify_bg(active_statusbar, GTK_STATE_INSENSITIVE, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->frame, GTK_STATE_NORMAL, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->frame, GTK_STATE_ACTIVE, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->frame, GTK_STATE_PRELIGHT, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->frame, GTK_STATE_SELECTED, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->frame, GTK_STATE_INSENSITIVE, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->label, GTK_STATE_NORMAL, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->label, GTK_STATE_ACTIVE, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->label, GTK_STATE_PRELIGHT, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->label, GTK_STATE_SELECTED, &red);
gtk_widget_modify_bg(GTK_STATUSBAR(active_statusbar)->label, GTK_STATE_INSENSITIVE, &red);


if(GTK_LABEL(GTK_STATUSBAR(active_statusbar)->label)->mnemonic_widget != NULL)
{


gtk_widget_modify_bg(GTK_LABEL(GTK_STATUSBAR(active_statusbar)->label)->mnemonic_widget, GTK_STATE_NORMAL, &red);

gtk_widget_modify_bg(GTK_LABEL(GTK_STATUSBAR(active_statusbar)->label)->mnemonic_widget, GTK_STATE_ACTIVE, &red);

gtk_widget_modify_bg(GTK_LABEL(GTK_STATUSBAR(active_statusbar)->label)->mnemonic_widget, GTK_STATE_PRELIGHT, &red);

gtk_widget_modify_bg(GTK_LABEL(GTK_STATUSBAR(active_statusbar)->label)->mnemonic_widget, GTK_STATE_SELECTED, &red);

gtk_widget_modify_bg(GTK_LABEL(GTK_STATUSBAR(active_statusbar)->label)->mnemonic_widget, GTK_STATE_INSENSITIVE, &red);
}



Best regards Egon Andersen _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux