[Bf-blender-cvs] [9169d401757] master: UI: tweak warning messages style and layout in save/close dialog

Yevgeny Makarov noreply at git.blender.org
Tue Aug 27 12:50:34 CEST 2019


Commit: 9169d401757c448e7c5e6850914123dd3de2afed
Author: Yevgeny Makarov
Date:   Tue Aug 27 12:29:06 2019 +0200
Branches: master
https://developer.blender.org/rB9169d401757c448e7c5e6850914123dd3de2afed

UI: tweak warning messages style and layout in save/close dialog

Differential Revision: https://developer.blender.org/D5589

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

M	source/blender/windowmanager/intern/wm_files.c

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

diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 9cf14f6d1d6..3751c76c571 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -3074,6 +3074,12 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, struct ARegi
   BKE_reports_init(&reports, RPT_STORE);
   uint modified_images_count = ED_image_save_all_modified_info(C, &reports);
 
+  LISTBASE_FOREACH (Report *, report, &reports.list) {
+    uiLayout *row = uiLayoutRow(layout, false);
+    uiLayoutSetRedAlert(row, true);
+    uiItemL(row, report->message, ICON_CANCEL);
+  }
+
   if (modified_images_count > 0) {
     char message[64];
     BLI_snprintf(message,
@@ -3099,13 +3105,9 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, struct ARegi
                  "");
   }
 
-  LISTBASE_FOREACH (Report *, report, &reports.list) {
-    uiItemL(layout, report->message, ICON_ERROR);
-  }
-
   BKE_reports_clear(&reports);
 
-  uiItemL(layout, "", ICON_NONE);
+  uiItemS_ex(layout, 3.0f);
 
   /* Buttons */
 #ifdef _WIN32



More information about the Bf-blender-cvs mailing list