Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Reynish <billrey@me.com>2019-05-17 19:56:46 +0300
committerWilliam Reynish <billrey@me.com>2019-05-17 19:58:35 +0300
commit0920cb650d55b041f5178e639da82ba1f6ae956a (patch)
treefabc9e1a14c026b8872874288b45cced9f701c74
parente3ea703b092c2c0b4e9af45d4ef309f97dc3fd23 (diff)
UI: Small tweaks to the save dialog:
- Add back info icon at the top. - Remove icons from the buttons. None of the OS's we support use icons here - Remove button align. It doesn't work well with the active default highlighting - Center-align the text inside the buttons To make this look even nicer, we should add more padding all around the edges, but that could be done separately.
-rw-r--r--source/blender/windowmanager/intern/wm_files.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 66bc09825d6..96b97f67cda 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -2925,10 +2925,10 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, struct ARegi
bool blend_file_is_saved = BKE_main_blendfile_path(bmain)[0] != '\0';
if (blend_file_is_saved) {
- uiItemL(layout, "This file has unsaved changes.", ICON_NONE);
+ uiItemL(layout, "This file has unsaved changes.", ICON_INFO);
}
else {
- uiItemL(layout, "This file has not been saved yet.", ICON_NONE);
+ uiItemL(layout, "This file has not been saved yet.", ICON_INFO);
}
ReportList reports;
@@ -2974,7 +2974,7 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, struct ARegi
but = uiDefIconTextBut(block,
UI_BTYPE_BUT,
0,
- ICON_SCREEN_BACK,
+ 0,
IFACE_("Cancel"),
0,
0,
@@ -2987,16 +2987,17 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, struct ARegi
0,
"");
UI_but_func_set(but, wm_block_file_close_cancel, block, post_action);
+ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
/* empty space between buttons */
col = uiLayoutColumn(split, false);
uiItemS(col);
- col = uiLayoutColumn(split, true);
+ col = uiLayoutColumn(split, false);
but = uiDefIconTextBut(block,
UI_BTYPE_BUT,
0,
- ICON_CANCEL,
+ 0,
IFACE_("Discard Changes"),
0,
0,
@@ -3009,12 +3010,13 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, struct ARegi
0,
"");
UI_but_func_set(but, wm_block_file_close_discard, block, post_action);
+ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
- col = uiLayoutColumn(split, true);
+ col = uiLayoutColumn(split, false);
but = uiDefIconTextBut(block,
UI_BTYPE_BUT,
0,
- ICON_FILE_TICK,
+ 0,
IFACE_("Save"),
0,
0,
@@ -3027,6 +3029,7 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, struct ARegi
0,
"");
UI_but_func_set(but, wm_block_file_close_save, block, post_action);
+ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
UI_but_flag_enable(but, UI_BUT_ACTIVE_DEFAULT);
UI_block_bounds_set_centered(block, 10);