keyboard: make the "Set" and "Add" buttons blue

Per the available mockups [1], the "Set" and "Add" buttons
are the suggested action of the dialog and should be blue.

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/keyboard/keyboard-wires.png

https://bugzilla.gnome.org/show_bug.cgi?id=777842
This commit is contained in:
Georges Basile Stavracas Neto 2017-01-31 10:07:52 -02:00
parent 6f60e64075
commit c57cadf50b
2 changed files with 27 additions and 6 deletions

View file

@ -319,6 +319,25 @@ set_header_mode (CcKeyboardShortcutEditor *self,
mode != HEADER_MODE_CUSTOM_EDIT);
gtk_widget_set_visible (self->replace_button, mode == HEADER_MODE_REPLACE);
gtk_widget_set_visible (self->set_button, mode == HEADER_MODE_SET);
/* By setting the default response, the action button gets the 'suggested-action' applied */
switch (mode)
{
case HEADER_MODE_SET:
gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_APPLY);
break;
case HEADER_MODE_REPLACE:
gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_ACCEPT);
break;
case HEADER_MODE_ADD:
gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_OK);
break;
default:
gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_NONE);
}
}
static void