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:
authorHarley Acheson <harley.acheson@gmail.com>2021-02-08 19:19:23 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-02-08 19:19:23 +0300
commit694bc4d040a8bf762284598e98bf0575549a3e1c (patch)
tree0e4d95baac18731e0ab5a135acf5eff6f8b53432 /source/blender/editors/interface/interface_utils.c
parent21a2b975b8192c2714625c8f5e98a08fde796ba7 (diff)
Fix for T84038: Improved Report Warnings
Improved contrast for Status Bar report warning messages. Differential Revision: https://developer.blender.org/D10242 Reviewed by Hans Goudey
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c67
1 files changed, 63 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 958a0bc03cd..f9eba9eeb6f 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -544,15 +544,74 @@ int UI_icon_from_id(ID *id)
int UI_icon_from_report_type(int type)
{
if (type & RPT_ERROR_ALL) {
- return ICON_ERROR;
+ return ICON_CANCEL;
}
- if (type & RPT_WARNING_ALL) {
+ else if (type & RPT_WARNING_ALL) {
return ICON_ERROR;
}
- if (type & RPT_INFO_ALL) {
+ else if (type & RPT_INFO_ALL) {
return ICON_INFO;
}
- return ICON_NONE;
+ else if (type & RPT_DEBUG_ALL) {
+ return ICON_SYSTEM;
+ }
+ else if (type & RPT_PROPERTY) {
+ return ICON_OPTIONS;
+ }
+ else if (type & RPT_OPERATOR) {
+ return ICON_CHECKMARK;
+ }
+ return ICON_INFO;
+}
+
+int UI_icon_colorid_from_report_type(int type)
+{
+ if (type & RPT_ERROR_ALL) {
+ return TH_INFO_ERROR;
+ }
+ else if (type & RPT_WARNING_ALL) {
+ return TH_INFO_WARNING;
+ }
+ else if (type & RPT_INFO_ALL) {
+ return TH_INFO_INFO;
+ }
+ else if (type & RPT_DEBUG_ALL) {
+ return TH_INFO_DEBUG;
+ }
+ else if (type & RPT_PROPERTY) {
+ return TH_INFO_PROPERTY;
+ }
+ else if (type & RPT_OPERATOR) {
+ return TH_INFO_OPERATOR;
+ }
+ else {
+ return TH_INFO_WARNING;
+ }
+}
+
+int UI_text_colorid_from_report_type(int type)
+{
+ if (type & RPT_ERROR_ALL) {
+ return TH_INFO_ERROR_TEXT;
+ }
+ else if (type & RPT_WARNING_ALL) {
+ return TH_INFO_WARNING_TEXT;
+ }
+ else if (type & RPT_INFO_ALL) {
+ return TH_INFO_INFO_TEXT;
+ }
+ else if (type & RPT_DEBUG_ALL) {
+ return TH_INFO_DEBUG_TEXT;
+ }
+ else if (type & RPT_PROPERTY) {
+ return TH_INFO_PROPERTY_TEXT;
+ }
+ else if (type & RPT_OPERATOR) {
+ return TH_INFO_OPERATOR_TEXT;
+ }
+ else {
+ return TH_INFO_WARNING_TEXT;
+ }
}
/********************************** Misc **************************************/