[gtk/peek-password] password entry: Make the capslock indicator less pronounced



commit 1995335fb4cf09024f2682e1ccc225bb3e4c67fd
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 14 17:46:06 2019 -0400

    password entry: Make the capslock indicator less pronounced
    
    Use the new indicator style class to deemphasize the capslock
    warning icon relative to the peek icon. Also, avoid changing
    the cursor there, so it doesn't appear clickable at all.

 gtk/gtkpasswordentry.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c
index 6e1f911b1c..054597b697 100644
--- a/gtk/gtkpasswordentry.c
+++ b/gtk/gtkpasswordentry.c
@@ -172,6 +172,8 @@ gtk_password_entry_init (GtkPasswordEntry *entry)
   g_signal_connect (priv->entry, "populate-popup", G_CALLBACK (populate_popup), entry);
 
   priv->icon = gtk_image_new_from_icon_name ("caps-lock-symbolic");
+  gtk_style_context_add_class (gtk_widget_get_style_context (priv->icon), "indicator");
+  gtk_widget_set_cursor (priv->icon, gtk_widget_get_cursor (priv->entry));
   gtk_widget_set_tooltip_text (priv->icon, _("Caps Lock is on"));
   gtk_container_add (GTK_CONTAINER (priv->box), priv->icon);
 


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