After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687363 - GtkTextView not stylable
GtkTextView not stylable
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-11-01 18:00 UTC by Timothy Pearson
Modified: 2014-12-06 00:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Timothy Pearson 2012-11-01 18:00:01 UTC
GtkTextView does not use the normal style-based drawing methods for its frame and background, therefore those elements cannot be drawn by a style engine.  

Furthermore, GtkTextView appears to completely ignore attempts to change its colors via css; the recommended CSS snippet on this page only changes the cursor color: http://www.gtkforums.com/viewtopic.php?f=3&t=988&p=195276&hilit=Styling%20a%20GtkTextView%20with%20Gtk3%20and%20Css#p195276
Comment 1 Matthias Clasen 2014-12-06 00:39:04 UTC
This works as expected when I enter it in the css tab in GtkInspector:

GtkTextView {
  color: blue;
  background-color: red;
}

GtkTextView:selected {
  color: red;
  background-color: blue;
}