[Bf-blender-cvs] [0920cb650d5] master: UI: Small tweaks to the save dialog:
William Reynish
noreply at git.blender.org
Fri May 17 18:58:45 CEST 2019
Commit: 0920cb650d55b041f5178e639da82ba1f6ae956a
Author: William Reynish
Date: Fri May 17 18:56:46 2019 +0200
Branches: master
https://developer.blender.org/rB0920cb650d55b041f5178e639da82ba1f6ae956a
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.
===================================================================
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 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);
More information about the Bf-blender-cvs
mailing list