user-accounts: Change colors of password strength indicator

Use red-yellow- green colors for strength indicator levels.

https://bugzilla.gnome.org/show_bug.cgi?id=780002
This commit is contained in:
Ondrej Holy 2017-04-05 13:31:42 +02:00 committed by Felipe Borges
parent cd1f96f8ba
commit 4cad3ca408
3 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,17 @@
levelbar .strength-weak {
background-color: #cc0000;
border-color: #cc0000;
}
levelbar .strength-low {
background-color: #f5ce00;
border-color: #f5ce00;
}
levelbar .strength-medium,
levelbar .strength-good,
levelbar .strength-high {
background-color: #73d216;
border-color: #73d216;
}

View file

@ -1447,6 +1447,7 @@ cc_user_panel_init (CcUserPanel *self)
GError *error;
volatile GType type G_GNUC_UNUSED;
GtkWidget *button;
GtkCssProvider *provider;
d = self->priv = UM_USER_PANEL_PRIVATE (self);
g_resources_register (um_get_resource ());
@ -1469,6 +1470,13 @@ cc_user_panel_init (CcUserPanel *self)
return;
}
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_resource (provider, "/org/gnome/control-center/user-accounts/user-accounts-dialog.css");
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
d->headerbar_buttons = get_widget (d, "headerbar-buttons");
d->login_screen_settings = settings_or_null ("org.gnome.login-screen");

View file

@ -7,6 +7,7 @@
<file alias="password-dialog.ui" preprocess="xml-stripblanks">data/password-dialog.ui</file>
<file alias="history-dialog.ui" preprocess="xml-stripblanks">data/history-dialog.ui</file>
<file alias="user-accounts-dialog.ui" preprocess="xml-stripblanks">data/user-accounts-dialog.ui</file>
<file alias="user-accounts-dialog.css">data/user-accounts-dialog.css</file>
<file alias="carousel.ui" preprocess="xml-stripblanks">data/carousel.ui</file>
<file alias="carousel.css">data/carousel.css</file>
<file alias="left-index-finger.png">data/icons/left-index-finger.png</file>