diff --git a/source/blender/editors/interface/interface_layout.cc b/source/blender/editors/interface/interface_layout.cc index 0d2541b7680..f4d47408698 100644 --- a/source/blender/editors/interface/interface_layout.cc +++ b/source/blender/editors/interface/interface_layout.cc @@ -6485,7 +6485,7 @@ uiLayout *uiItemsAlertBox(uiBlock *block, uiLayout *uiItemsAlertBox(uiBlock *block, const int size, const eAlertIcon icon) { const uiStyle *style = UI_style_get_dpi(); - const short icon_size = 64 * UI_SCALE_FAC; + const short icon_size = 40 * UI_SCALE_FAC; const int dialog_width = icon_size + (style->widget.points * size * UI_SCALE_FAC); return uiItemsAlertBox(block, style, dialog_width, icon, icon_size); } diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index b3a4431d0a5..27c74f49241 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -4077,7 +4077,7 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void const int dialog_width = std::max(int(400.0f * UI_SCALE_FAC), text_width + int(style->columnspace * 2.5)); - const short icon_size = 64 * UI_SCALE_FAC; + const short icon_size = 40 * UI_SCALE_FAC; uiLayout *layout = uiItemsAlertBox( block, style, dialog_width + icon_size, ALERT_ICON_ERROR, icon_size); @@ -4092,7 +4092,7 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void PointerRNA pref_ptr = RNA_pointer_create_discrete(nullptr, &RNA_PreferencesFilePaths, &U); uiItemR(layout, &pref_ptr, "use_scripts_auto_execute", UI_ITEM_NONE, checkbox_text, ICON_NONE); - uiItemS_ex(layout, 3.0f); + uiItemS_ex(layout, 2.0f); /* Buttons. */ uiBut *but; @@ -4752,7 +4752,7 @@ static uiBlock *block_create__close_file_dialog(bContext *C, ARegion *region, vo BKE_reports_free(&reports); - uiItemS_ex(layout, has_extra_checkboxes ? 2.0f : 4.0f); + uiItemS_ex(layout, 2.0f); /* Buttons. */ #ifdef _WIN32 diff --git a/source/blender/windowmanager/intern/wm_operators.cc b/source/blender/windowmanager/intern/wm_operators.cc index 25f73784eaa..b1adb4370c3 100644 --- a/source/blender/windowmanager/intern/wm_operators.cc +++ b/source/blender/windowmanager/intern/wm_operators.cc @@ -1519,7 +1519,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_ wmOperator *op = data->op; const uiStyle *style = UI_style_get_dpi(); const bool small = data->size == WM_POPUP_SIZE_SMALL; - const short icon_size = (small ? 32 : 64) * UI_SCALE_FAC; + const short icon_size = (small ? 32 : 40) * UI_SCALE_FAC; uiBlock *block = UI_block_begin(C, region, __func__, UI_EMBOSS); UI_block_flag_disable(block, UI_BLOCK_LOOP); @@ -1581,8 +1581,13 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_ } /* Message lines. */ - for (auto &st : message_lines) { - uiItemL(layout, st, ICON_NONE); + if (message_lines.size() > 0) { + uiLayout *lines = uiLayoutColumn(layout, false); + uiLayoutSetScaleY(lines, 0.65f); + uiItemS_ex(lines, 0.1f); + for (auto &st : message_lines) { + uiItemL(lines, st, ICON_NONE); + } } if (data->include_properties) { @@ -1590,7 +1595,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_ uiTemplateOperatorPropertyButs(C, layout, op, UI_BUT_LABEL_ALIGN_SPLIT_COLUMN, 0); } - uiItemS_ex(layout, small ? 0.1f : 2.0f); + uiItemS_ex(layout, small ? 0.1f : 1.8f); /* Clear so the OK button is left alone. */ UI_block_func_set(block, nullptr, nullptr, nullptr); diff --git a/source/blender/windowmanager/intern/wm_window.cc b/source/blender/windowmanager/intern/wm_window.cc index 4236de31fea..ef7da4be500 100644 --- a/source/blender/windowmanager/intern/wm_window.cc +++ b/source/blender/windowmanager/intern/wm_window.cc @@ -2101,7 +2101,7 @@ static uiBlock *block_create_opengl_usage_warning(bContext *C, ARegion *region, const int dialog_width = std::max(int(400.0f * UI_SCALE_FAC), text_width + int(style->columnspace * 2.5)); - const short icon_size = 64 * UI_SCALE_FAC; + const short icon_size = 40 * UI_SCALE_FAC; uiLayout *layout = uiItemsAlertBox( block, style, dialog_width + icon_size, ALERT_ICON_ERROR, icon_size); @@ -2111,16 +2111,20 @@ static uiBlock *block_create_opengl_usage_warning(bContext *C, ARegion *region, /* Title and explanation text. */ uiItemL_ex(col, title, ICON_NONE, true, false); uiItemS_ex(col, 0.8f, LayoutSeparatorType::Space); - uiItemL(col, message1, ICON_NONE); - uiItemL(col, message2, ICON_NONE); - uiItemL(col, message3, ICON_NONE); + + uiLayout *messages = uiLayoutColumn(col, false); + uiLayoutSetScaleY(messages, 0.8f); + + uiItemL(messages, message1, ICON_NONE); + uiItemL(messages, message2, ICON_NONE); + uiItemL(messages, message3, ICON_NONE); if (G.opengl_deprecation_usage_filename) { char location[1024]; SNPRINTF( location, "%s:%d", G.opengl_deprecation_usage_filename, G.opengl_deprecation_usage_lineno); - uiItemL(col, location, ICON_NONE); + uiItemL(messages, location, ICON_NONE); } - uiItemL(col, message4, ICON_NONE); + uiItemL(messages, message4, ICON_NONE); uiItemS_ex(col, 0.5f, LayoutSeparatorType::Space); @@ -2177,16 +2181,16 @@ static uiBlock *block_create_gpu_backend_fallback(bContext *C, ARegion *region, /* Title and explanation text. */ uiLayout *col = uiLayoutColumn(layout, false); + uiLayoutSetScaleY(col, 0.8f); uiItemL_ex( col, RPT_("Failed to load using Vulkan, using OpenGL instead."), ICON_NONE, true, false); - uiItemL(col, RPT_(""), ICON_NONE); + uiItemS_ex(col, 1.3f, LayoutSeparatorType::Space); + uiItemL(col, RPT_("Updating GPU drivers may solve this issue."), ICON_NONE); uiItemL(col, RPT_("The graphics backend can be changed in the System section of the Preferences."), ICON_NONE); - uiItemS(layout); - UI_block_bounds_set_centered(block, 14 * UI_SCALE_FAC); return block;