[gtk] password entry: Make the Caps Lock icon less prominent
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] password entry: Make the Caps Lock icon less prominent
- Date: Fri, 15 Mar 2019 00:06:44 +0000 (UTC)
commit d3cecd65a5da94711315269415ef24f3896ce622
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 14 20:03:34 2019 -0400
password entry: Make the Caps Lock icon less prominent
Set a style class, and theme the Caps Lock icon to
be less promient, so it does not appear clickable.
gtk/gtkpasswordentry.c | 1 +
gtk/theme/Adwaita/_common.scss | 4 ++++
2 files changed, 5 insertions(+)
---
diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c
index b096b3d578..08467ad509 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_style_context_add_class (gtk_widget_get_style_context (priv->icon), "caps-lock-indicator");
gtk_widget_set_cursor (priv->icon, gtk_widget_get_cursor (priv->entry));
gtk_container_add (GTK_CONTAINER (priv->box), priv->icon);
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 4ff6705559..dd26261c73 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -338,6 +338,10 @@ entry {
&:backdrop { color: mix($backdrop_fg_color, $backdrop_base_color, 80%); }
}
+ &.password image.caps-lock-indicator {
+ color: mix($backdrop_fg_color, $backdrop_base_color, 80%);
+ }
+
&:drop(active) {
&:focus, & {
border-color: $drop_target_color;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]