[gtk] password entry: Use text cursor for Caps Lock indicator



commit 470720e11af977597f8c1237f530888dc52d1e78
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 14 19:17:39 2019 -0400

    password entry: Use text cursor for Caps Lock indicator
    
    We don't want it to appear clickable, but we still
    need to keep it pickable for the tooltip to work,
    so explicitly give it the same cursor that we use
    for the text.

 gtk/gtkpasswordentry.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c
index ee61d05c59..b096b3d578 100644
--- a/gtk/gtkpasswordentry.c
+++ b/gtk/gtkpasswordentry.c
@@ -118,6 +118,7 @@ gtk_password_entry_init (GtkPasswordEntry *entry)
 
   priv->icon = gtk_image_new_from_icon_name ("caps-lock-symbolic");
   gtk_widget_set_tooltip_text (priv->icon, _("Caps Lock is on"));
+  gtk_widget_set_cursor (priv->icon, gtk_widget_get_cursor (priv->entry));
   gtk_container_add (GTK_CONTAINER (priv->box), priv->icon);
 
   gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), I_("password"));


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