TextView background color: bug or misunderstanding?
- From: Kasper Peeters <kasper peeters phi-sci com>
- To: gtk-devel-list gnome org
- Subject: TextView background color: bug or misunderstanding?
- Date: Sat, 4 Jul 2015 13:04:08 +0200
I am trying to make the background colour of all TextViews white, using
gtk_widget_override_background_color()
This does make the background white, but it also makes the color used
for selection highlight white. As a result, I can't see anymore what I
am selecting.
So I thought this might be because I am supposed to use CSS for
styling, but that actually leads to the same problem. If I do the
following (sorry, this is gtkmm code, but the logic should be clear):
Glib::ustring data = "GtkTextView { background: white; }";
auto css = Gtk::CssProvider::create();
css->load_from_data(data);
auto screen = Gdk::Screen::get_default();
Gtk::StyleContext::add_provider_for_screen(screen,css,
GTK_STYLE_PROVIDER_PRIORITY_USER);
then I also get a white background, but again the selection highlight
color is now white too.
Is this a bug? (this is with gtk-3.10.8). Or am I doing something wrong?
Thanks!
(I have asked this on gtk-list but no-one there seems to have an
answer).
Cheers,
Kasper
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]