From 7ff0f896e8578bbea87b6619f5905a98f97331ff Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 20 Apr 2020 15:46:10 +0200 Subject: [PATCH] UI: Use different icon to remove user-created shortcuts in Preferences There was no way for users to visually tell appart shortcut items they've added themselves and the default ones. Both used the same 'x' icon to remove the item. Modified items already showed a back-arrow icon; this commit makes user-created shortcuts use an icon that has both, a back-arrow and a 'x'. The icon is in fact from the Movie Clip Editor, but William Reynish and I concluded that it's not worth creating and adding a new one just to short-term fix this small annoyance. And the icon actually fits the purpose surprisingly well :) {F8485176} --- release/scripts/modules/rna_keymap_ui.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release/scripts/modules/rna_keymap_ui.py b/release/scripts/modules/rna_keymap_ui.py index 22be5186186..844daded570 100644 --- a/release/scripts/modules/rna_keymap_ui.py +++ b/release/scripts/modules/rna_keymap_ui.py @@ -161,7 +161,12 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level): if (not kmi.is_user_defined) and kmi.is_user_modified: row.operator("preferences.keyitem_restore", text="", icon='BACK').item_id = kmi.id else: - row.operator("preferences.keyitem_remove", text="", icon='X').item_id = kmi.id + row.operator( + "preferences.keyitem_remove", + text="", + # Abusing the tracking icon, but it works pretty well here. + icon=('TRACKING_CLEAR_BACKWARDS' if kmi.is_user_defined else 'X') + ).item_id = kmi.id # Expanded, additional event settings if kmi.show_expanded: