Changing background of TextView makes selection invisible

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

 



I am trying to make the background colour of all TextViews white, using
something along the lines of (this is gtkmm, but the problem is the same
in pure gtk):

  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);

This does make the background white, but it also makes the colour used
for selection highlight white. As a result, I can't see anymore what I
am selecting.

A different colour leads to the same result: the highlight colour
becomes the same as the background colour, and hence the selection
becomes invisible. The same also happens when using the
override_background_color(..) function of the widget.

Is this a bug? (this is with gtk-3.10.8). Or am I doing something wrong?
Thanks!

Cheers,
Kasper
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://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