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 692554 - entry: never use GTK_STATE_ACTIVE to paint the background
entry: never use GTK_STATE_ACTIVE to paint the background
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 685712
 
 
Reported: 2013-01-25 20:02 UTC by Cosimo Cecchi
Modified: 2013-01-25 20:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
entry: never use GTK_STATE_ACTIVE to paint the background (2.12 KB, patch)
2013-01-25 20:02 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2013-01-25 20:02:41 UTC
This is a patch against gtk-2-24 that makes it possible to fix https://bugzilla.gnome.org/show_bug.cgi?id=685712
Rationale in the commit message
Comment 1 Cosimo Cecchi 2013-01-25 20:02:43 UTC
Created attachment 234443 [details] [review]
entry: never use GTK_STATE_ACTIVE to paint the background

When state-hint is TRUE, GTK_STATE_ACTIVE was used to paint the entry
background and frame, since commit
207f3f8685f21bbade8ae0a6551a0e92d6baad89.

Given that everywhere else in GTK2 - including GtkEntry itself in
draw_text_with_color() - GTK_STATE_ACTIVE is used for non-toggleable
widgets to indicate selected but not focused text, this leads to the
entry painting itself with the wrong background color when focused.
This is unsolvable from the theme, as changing the ACTIVE background
color to be the same as NORMAL would give a wrong background to selected
but not focused text as per above.

This patch avoids using GTK_STATE_ACTIVE to paint GtkEntry's background,
changing the code so that the widget state is always used instead.
Comment 2 Cosimo Cecchi 2013-01-25 20:17:30 UTC
Attachment 234443 [details] pushed as 87115e0 - entry: never use GTK_STATE_ACTIVE to paint the background