diff options
Diffstat (limited to 'source/blender/windowmanager')
9 files changed, 32 insertions, 28 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 8d4ef29af74..b81ef14f21c 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -729,6 +729,7 @@ enum { WM_JOB_TYPE_LIGHT_BAKE, WM_JOB_TYPE_FSMENU_BOOKMARK_VALIDATE, WM_JOB_TYPE_QUADRIFLOW_REMESH, + WM_JOB_TYPE_TRACE_IMAGE, /* add as needed, bake, seq proxy build * if having hard coded values is a problem */ }; diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c index b81b12a1b06..a56a506b1ab 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c @@ -611,6 +611,7 @@ void WM_gizmo_calc_matrix_final(const wmGizmo *gz, float r_mat[4][4]) r_mat); } +/* -------------------------------------------------------------------- */ /** \name Gizmo Property Access * * Matches `WM_operator_properties` conventions. @@ -755,6 +756,7 @@ void WM_gizmo_properties_free(PointerRNA *ptr) /** \} */ +/* -------------------------------------------------------------------- */ /** \name General Utilities * * \{ */ diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c index eea046cd1cf..e9a1b5e3df0 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c @@ -344,6 +344,7 @@ bool wm_gizmogroup_is_any_selected(const wmGizmoGroup *gzgroup) /** \} */ +/* -------------------------------------------------------------------- */ /** \name Gizmo operators * * Basic operators for gizmo interaction with user configurable keymaps. diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c index f594ced6b66..a9e24867351 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c @@ -38,6 +38,7 @@ #include "wm_gizmo_intern.h" #include "wm_gizmo_wmapi.h" +/* -------------------------------------------------------------------- */ /** \name GizmoGroup Type Append * * \note This follows conventions from #WM_operatortype_find #WM_operatortype_append & friends. diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c index 3956ff8fd36..efd7a13d02a 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c @@ -45,6 +45,7 @@ #include "wm_gizmo_intern.h" #include "wm_gizmo_wmapi.h" +/* -------------------------------------------------------------------- */ /** \name Gizmo Type Append * * \note This follows conventions from #WM_operatortype_find #WM_operatortype_append & friends. diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index a862d221815..0a60d993c37 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -3190,8 +3190,13 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, const int text_points_max = MAX2(style->widget.points, style->widgetlabel.points); const int dialog_width = icon_size + (text_points_max * 34 * U.dpi_fac); + /* By default, the space between icon and text/buttons will be equal to the 'columnspace', + this extra padding will add some space by increasing the left column width, + making the icon placement more symmetrical, between the block edge and the text. */ + const float icon_padding = 6.0f * U.dpi_fac; /* Calculate icon column factor. */ - const float split_factor = (float)icon_size / (float)(dialog_width - style->columnspace); + const float split_factor = ((float)icon_size + icon_padding) / + (float)(dialog_width - style->columnspace); uiBlock *block = UI_block_begin(C, region, close_file_dialog_name, UI_EMBOSS); @@ -3207,8 +3212,10 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, uiLayout *split_block = uiLayoutSplit(block_layout, split_factor, false); /* Alert Icon. */ - uiLayout *layout = uiLayoutColumn(split_block, false); - uiDefButAlert(block, ALERT_ICON_QUESTION, 0, 0, 0, icon_size); + uiLayout *layout = uiLayoutRow(split_block, false); + /* Using 'align_left' with 'row' avoids stretching the icon along the width of column. */ + uiLayoutSetAlignment(layout, UI_LAYOUT_ALIGN_LEFT); + uiDefButAlert(block, ALERT_ICON_QUESTION, 0, 0, icon_size, icon_size); /* The rest of the content on the right. */ layout = uiLayoutColumn(split_block, false); @@ -3221,10 +3228,9 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, char filename[FILE_MAX]; if (blendfile_pathpath[0] != '\0') { BLI_split_file_part(blendfile_pathpath, filename, sizeof(filename)); - BLI_path_extension_replace(filename, sizeof(filename), ""); } else { - STRNCPY(filename, IFACE_("Untitled")); + STRNCPY(filename, IFACE_("untitled.blend")); } uiItemL(layout, filename, ICON_NONE); @@ -3236,7 +3242,7 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, LISTBASE_FOREACH (Report *, report, &reports.list) { uiLayout *row = uiLayoutColumn(layout, false); uiLayoutSetScaleY(row, 0.6f); - uiItemS_ex(row, 1.2f); + uiItemS(row); /* Error messages created in ED_image_save_all_modified_info() can be long, * but are made to separate into two parts at first colon between text and paths. @@ -3261,10 +3267,9 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, char message[64]; BLI_snprintf(message, sizeof(message), - (modified_images_count == 1) ? "Save %u modified image" : - "Save %u modified images", + "Save %u modified image(s)", modified_images_count); - uiItemS_ex(layout, 2.0f); + uiItemS(layout); uiDefButBitC(block, UI_BTYPE_CHECKBOX, 1, @@ -3284,7 +3289,7 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, BKE_reports_clear(&reports); - uiItemS_ex(layout, 1.0f); + uiItemS_ex(layout, modified_images_count > 0 ? 2.0f : 4.0f); /* Buttons. */ #ifdef _WIN32 @@ -3296,13 +3301,10 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, if (windows_layout) { /* Windows standard layout. */ - uiLayout *split = uiLayoutSplit(block_layout, 0.174f, true); + uiLayout *split = uiLayoutSplit(layout, 0.0f, true); uiLayoutSetScaleY(split, 1.2f); uiLayoutColumn(split, false); - uiItemS(layout); - - uiLayoutColumn(split, false); wm_block_file_close_save_button(block, post_action); uiLayoutColumn(split, false); @@ -3314,21 +3316,16 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, else { /* Non-Windows layout (macOS and Linux). */ - uiLayout *split = uiLayoutSplit(block_layout, 0.167f, true); + uiLayout *split = uiLayoutSplit(layout, 0.3f, true); uiLayoutSetScaleY(split, 1.2f); - layout = uiLayoutColumn(split, false); - uiItemS(layout); - - /* Split button area into two sections: 40/60. */ - uiLayout *split_left = uiLayoutSplit(split, 0.40f, true); - - /* First button uses 75% of left side (30% of original). */ - uiLayoutSplit(split_left, 0.75f, true); + uiLayoutColumn(split, false); wm_block_file_close_discard_button(block, post_action); - /* The right side is split 50/50 (each 30% of original). */ - uiLayout *split_right = uiLayoutSplit(split_left, 0.50f, true); + uiLayout *split_right = uiLayoutSplit(split, 0.1f, true); + + uiLayoutColumn(split_right, false); + /* Empty space. */ uiLayoutColumn(split_right, false); wm_block_file_close_cancel_button(block, post_action); diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c index cde0cb77678..523147cd4f3 100644 --- a/source/blender/windowmanager/intern/wm_operator_type.c +++ b/source/blender/windowmanager/intern/wm_operator_type.c @@ -95,6 +95,7 @@ void WM_operatortype_iter(GHashIterator *ghi) BLI_ghashIterator_init(ghi, global_ops_hash); } +/* -------------------------------------------------------------------- */ /** \name Operator Type Append * \{ */ diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 613de5a9b17..4604f66d866 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3771,7 +3771,7 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf) {GESTURE_MODAL_CIRCLE_SIZE, "SIZE", 0, "Size", ""}, {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, - {GESTURE_MODAL_DESELECT, "DESELECT", 0, "DeSelect", ""}, + {GESTURE_MODAL_DESELECT, "DESELECT", 0, "Deselect", ""}, {GESTURE_MODAL_NOP, "NOP", 0, "No Operation", ""}, {0, NULL, 0, NULL, NULL}, @@ -3834,7 +3834,7 @@ static void gesture_box_modal_keymap(wmKeyConfig *keyconf) static const EnumPropertyItem modal_items[] = { {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, - {GESTURE_MODAL_DESELECT, "DESELECT", 0, "DeSelect", ""}, + {GESTURE_MODAL_DESELECT, "DESELECT", 0, "Deselect", ""}, {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, {GESTURE_MODAL_MOVE, "MOVE", 0, "Move", ""}, {0, NULL, 0, NULL, NULL}, diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index 5d1607fe506..ee6aee1fb7a 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -1274,7 +1274,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv) g_WS.ghost_system = GHOST_CreateSystem(); GHOST_AddEventConsumer(g_WS.ghost_system, consumer); - playanim_window_open("Blender:Anim", start_x, start_y, ibuf->x, ibuf->y); + playanim_window_open("Blender Animation Player", start_x, start_y, ibuf->x, ibuf->y); } GHOST_GetMainDisplayDimensions(g_WS.ghost_system, &maxwinx, &maxwiny); |