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 685712 - Setting background on GtkEntry does not work
Setting background on GtkEntry does not work
Status: RESOLVED FIXED
Product: gnome-themes-standard
Classification: Core
Component: Adwaita GTK2 theme
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-themes-standard-maint
gnome-themes-standard-maint
: 692474 (view as bug list)
Depends on: 692554
Blocks:
 
 
Reported: 2012-10-08 11:44 UTC by Dmitry Shachnev
Modified: 2013-02-25 18:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk2: make it possible to override GtkEntry's backgrounds (32.78 KB, patch)
2013-01-25 20:01 UTC, Cosimo Cecchi
none Details | Review
Screenshot of Geany in GNOME 3.8 (15.96 KB, image/png)
2013-02-25 09:02 UTC, Dmitry Shachnev
  Details

Description Dmitry Shachnev 2012-10-08 11:44:22 UTC
Geany has these lines (https://github.com/geany/geany/blob/master/src/ui_utils.c#L956):

gtk_widget_modify_base(widget, GTK_STATE_NORMAL, success ? NULL : &red);
gtk_widget_modify_text(widget, GTK_STATE_NORMAL, success ? NULL : &white);

If success is true, this should set entry text to be white-on-red. This has been working with previous versions of Adwaita, but with 3.6 it makes the text white-on-white instead.

I use gnome-themes-standard 3.6.0.2, gtk2 2.24.13 and geany 1.22 from Debian unstable/experimental.

Originally reported at https://sourceforge.net/tracker/?func=detail&atid=787791&aid=3575449&group_id=153444.
Comment 1 Cosimo Cecchi 2013-01-24 21:18:57 UTC
*** Bug 692474 has been marked as a duplicate of this bug. ***
Comment 2 Cosimo Cecchi 2013-01-25 20:01:55 UTC
Created attachment 234442 [details] [review]
gtk2: make it possible to override GtkEntry's backgrounds

Some GTK2 applications like to override GtkEntry's background with their
own color for e.g. showing an error state.
Since we currently draw an asset for the entry's background, this
doesn't work.
To support this use case, always use the background color from the style
with no overrides, and put an overlay on top of it to get the same
gradient we used to get.
In addition, entry borders cannot be transparent anymore now, so we have
to provide two versions - a normal one and one that works on notebooks,
to avoid the base shining through the corners.
Comment 3 Cosimo Cecchi 2013-01-25 20:04:19 UTC
This depends on the GTK2 patch in bug 692554
Comment 4 Cosimo Cecchi 2013-01-25 20:26:09 UTC
Fixed now in master. Will backport to a final 3.6 release once the new GTK2 is out.
Comment 5 Dmitry Shachnev 2013-01-26 05:17:05 UTC
Thanks Cosimo!
Comment 6 Dmitry Shachnev 2013-02-25 09:02:29 UTC
Created attachment 237340 [details]
Screenshot of Geany in GNOME 3.8

Finally the new Gtk2 and gnome-themes-standard arrived in Debian experimental, so I am able to test it.

Now setting background works, but there is still a white border, see the screenshot attached.
Comment 7 Cosimo Cecchi 2013-02-25 18:06:50 UTC
Thanks for the feedback. That piece of border was harder to get rid of, but I now pushed an additional fix that does so to git master.