diff options
author | David Trowbridge <trowbrds@gmail.com> | 2013-08-19 13:41:39 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-08-19 13:41:39 -0400 |
commit | a864f9d052aa66430b5db572b9bb740b5beeb9a8 (patch) | |
tree | 94ccd4f7208fe809b8a68821438b87107a772e0b /gtk/gtkstylecontext.h | |
parent | d5e5616ae626fc68535984cb239f1f497dbf0048 (diff) | |
download | gtk+-a864f9d052aa66430b5db572b9bb740b5beeb9a8.tar.gz |
Fix GtkEntry drawing to provide visual feedback when editable=FALSE.
GtkEntry currently draws exactly the same no matter what the state of the
'editable' property. This is pretty confusing for users because there's
no visual feedback at all, it just seems like their keyboard is broken.
This change adds a "read-only" class to the StyleContext, which will
continue to allow the user to select/copy the text, but will draw the
entry as if it were insensitive, providing some indication that the
contents can't be changed.
Signed-off-by: David Trowbridge <trowbrds@gmail.com>
http://bugzilla.gnome.org/show_bug.cgi?id=694831
Diffstat (limited to 'gtk/gtkstylecontext.h')
-rw-r--r-- | gtk/gtkstylecontext.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index 729613c036..29f3ebfab8 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -923,6 +923,12 @@ void gtk_style_context_set_frame_clock (GtkStyleContext *context, GDK_AVAILABLE_IN_3_8 GdkFrameClock *gtk_style_context_get_frame_clock (GtkStyleContext *context); +/** + * GTK_STYLE_CLASS_READ_ONLY: + * + * A CSS class used to indicate a read-only state. + */ +#define GTK_STYLE_CLASS_READ_ONLY "read-only" GDK_DEPRECATED_IN_3_8_FOR(gtk_style_context_set_state) void gtk_style_context_set_direction (GtkStyleContext *context, |