mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
password entry: Don't show both icons
It can be a bit confusing to have an indicator and an action next to each other, and with the peek icon, the need for the Caps Lock warning is reduced, since you can just reveal the text to see that it is capitalized. Therefore, only show the Caps Lock warning if the peek icon is disabled.
This commit is contained in:
parent
34e859a5bc
commit
f14d998c95
@ -85,7 +85,8 @@ keymap_state_changed (GdkKeymap *keymap,
|
||||
|
||||
if (gtk_editable_get_editable (GTK_EDITABLE (entry)) &&
|
||||
gtk_widget_has_focus (priv->entry) &&
|
||||
gdk_keymap_get_caps_lock_state (priv->keymap))
|
||||
gdk_keymap_get_caps_lock_state (priv->keymap) &&
|
||||
!priv->peek_icon)
|
||||
gtk_widget_show (priv->icon);
|
||||
else
|
||||
gtk_widget_hide (priv->icon);
|
||||
@ -449,6 +450,8 @@ gtk_password_entry_set_show_peek_icon (GtkPasswordEntry *entry,
|
||||
gtk_text_set_visibility (GTK_TEXT (priv->entry), FALSE);
|
||||
}
|
||||
|
||||
keymap_state_changed (priv->keymap, GTK_WIDGET (entry));
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_SHOW_PEEK_ICON]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user