[Bf-blender-cvs] [3601cdd27bb] master: UI: Swap order of increment and decrement file name icon in File Browser

Julian Eisel noreply at git.blender.org
Wed Oct 21 17:40:51 CEST 2020


Commit: 3601cdd27bb351bce70e40e0f033ca6ddd9c9217
Author: Julian Eisel
Date:   Wed Oct 21 17:34:53 2020 +0200
Branches: master
https://developer.blender.org/rB3601cdd27bb351bce70e40e0f033ca6ddd9c9217

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

===================================================================

M	source/blender/editors/space_file/file_panels.c

===================================================================

diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index ff9454cd922..a71dec99e61 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -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 */



More information about the Bf-blender-cvs mailing list