diff options
author | Pablo Vazquez <venomgfx@gmail.com> | 2018-06-25 19:57:47 +0300 |
---|---|---|
committer | Pablo Vazquez <venomgfx@gmail.com> | 2018-06-25 19:57:51 +0300 |
commit | 9e88892f8f8a6dfa6092d87f0080f747233142e9 (patch) | |
tree | f05a75d0a5146da50f5feed01db77b12b065eba9 /source/blender/editors/interface | |
parent | 25a223c3bdddc4ced2558afcbc81f379ec3beff9 (diff) |
UI: Use background color for reports
At the moment it's using a hardcoded gray color that conflicts with
themes using gray for the header text. Instead use a slightly brighter
background color to make it stand, yet still use a theme setting.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 6ddecd169d9..61cb0cda8c8 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -4262,18 +4262,18 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) /* make a box around the report to make it stand out */ UI_block_align_begin(block); - but = uiDefBut(block, UI_BTYPE_ROUNDBOX, 0, "", 0, 0, UI_UNIT_X + 10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); + but = uiDefBut(block, UI_BTYPE_ROUNDBOX, 0, "", 0, 0, UI_UNIT_X + 5, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); /* set the report's bg color in but->col - UI_BTYPE_ROUNDBOX feature */ rgb_float_to_uchar(but->col, rti->col); but->col[3] = 255; - but = uiDefBut(block, UI_BTYPE_ROUNDBOX, 0, "", UI_UNIT_X + 10, 0, UI_UNIT_X + width, UI_UNIT_Y, + but = uiDefBut(block, UI_BTYPE_ROUNDBOX, 0, "", UI_UNIT_X + 5, 0, UI_UNIT_X + width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); - but->col[0] = but->col[1] = but->col[2] = unit_float_to_uchar_clamp(rti->grayscale); - but->col[3] = 255; UI_block_align_end(block); + UI_GetThemeColorShade3ubv(TH_BACK, 20, but->col); + but->col[3] = 255; /* icon and report message on top */ icon = UI_icon_from_report_type(report->type); @@ -4291,7 +4291,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) UI_block_emboss_set(block, UI_EMBOSS); - uiDefBut(block, UI_BTYPE_LABEL, 0, report->message, UI_UNIT_X + 10, 0, UI_UNIT_X + width, UI_UNIT_Y, + uiDefBut(block, UI_BTYPE_LABEL, 0, report->message, UI_UNIT_X + 5, 0, UI_UNIT_X + width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); } |