UI: Swap order of increment and decrement file name icon in File Browser

Swaps the order of the '+' and '-' button in the File Browser file name field,
so that '-' comes first.

For increasing or decreasing a value it makes more sense to have decreasing
first, increasing last. Consistent to how you press on the left side of a
number button for decrease, and right to increase.

However this is inconsistent in another way: Usually we have a '+' button
before a '-' button, but that refers to adding and removing items, not
increasing or decreasing. The icons are also placed in their own buttons then,
making them look more separate.
So the UI Team agreed on accepting that trade-off, see today's meeting notes:
https://devtalk.blender.org/t/2020-10-21-ui-team-upcoming/15849
This commit is contained in:
Julian Eisel 2020-10-21 17:34:53 +02:00
parent 876f78cbbb
commit 3601cdd27b
1 changed files with 3 additions and 3 deletions

View File

@ -180,12 +180,12 @@ static void file_panel_execution_buttons_draw(const bContext *C, Panel *panel)
UI_but_funcN_set(but, file_filename_enter_handle, NULL, but);
if (params->flag & FILE_CHECK_EXISTING) {
but_extra_rna_ptr = UI_but_extra_operator_icon_add(
but, "FILE_OT_filenum", WM_OP_EXEC_REGION_WIN, ICON_ADD);
RNA_int_set(but_extra_rna_ptr, "increment", 1);
but_extra_rna_ptr = UI_but_extra_operator_icon_add(
but, "FILE_OT_filenum", WM_OP_EXEC_REGION_WIN, ICON_REMOVE);
RNA_int_set(but_extra_rna_ptr, "increment", -1);
but_extra_rna_ptr = UI_but_extra_operator_icon_add(
but, "FILE_OT_filenum", WM_OP_EXEC_REGION_WIN, ICON_ADD);
RNA_int_set(but_extra_rna_ptr, "increment", 1);
}
/* check if this overrides a file and if the operator option is used */