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:
parent
6f60e64075
commit
c57cadf50b
2 changed files with 27 additions and 6 deletions
|
@ -319,6 +319,25 @@ set_header_mode (CcKeyboardShortcutEditor *self,
|
||||||
mode != HEADER_MODE_CUSTOM_EDIT);
|
mode != HEADER_MODE_CUSTOM_EDIT);
|
||||||
gtk_widget_set_visible (self->replace_button, mode == HEADER_MODE_REPLACE);
|
gtk_widget_set_visible (self->replace_button, mode == HEADER_MODE_REPLACE);
|
||||||
gtk_widget_set_visible (self->set_button, mode == HEADER_MODE_SET);
|
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
|
static void
|
||||||
|
|
|
@ -369,11 +369,9 @@
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="sensitive">False</property>
|
<property name="sensitive">False</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<signal name="clicked" handler="add_button_clicked_cb" object="CcKeyboardShortcutEditor" swapped="yes" />
|
<signal name="clicked" handler="add_button_clicked_cb" object="CcKeyboardShortcutEditor" swapped="yes" />
|
||||||
<style>
|
|
||||||
<class name="suggested-action" />
|
|
||||||
</style>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="pack_type">end</property>
|
<property name="pack_type">end</property>
|
||||||
|
@ -398,11 +396,9 @@
|
||||||
<property name="label" translatable="yes">Set</property>
|
<property name="label" translatable="yes">Set</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<signal name="clicked" handler="set_button_clicked_cb" object="CcKeyboardShortcutEditor" swapped="yes" />
|
<signal name="clicked" handler="set_button_clicked_cb" object="CcKeyboardShortcutEditor" swapped="yes" />
|
||||||
<style>
|
|
||||||
<class name="suggested-action" />
|
|
||||||
</style>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="pack_type">end</property>
|
<property name="pack_type">end</property>
|
||||||
|
@ -411,6 +407,12 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<action-widgets>
|
||||||
|
<action-widget response="cancel">cancel_button</action-widget>
|
||||||
|
<action-widget response="accept">replace_button</action-widget>
|
||||||
|
<action-widget response="apply">set_button</action-widget>
|
||||||
|
<action-widget response="ok" default="true">add_button</action-widget>
|
||||||
|
</action-widgets>
|
||||||
</template>
|
</template>
|
||||||
<object class="GtkSizeGroup">
|
<object class="GtkSizeGroup">
|
||||||
<widgets>
|
<widgets>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue