UI: tweak drawing of header status text for transparent headers.

This commit is contained in:
2018-08-15 14:47:48 +02:00
parent 913b8396d9
commit 1d067868c0
5 changed files with 73 additions and 5 deletions

View File

@@ -778,6 +778,21 @@ void BLI_str_toupper_ascii(char *str, const size_t len)
str[i] -= 'a' - 'A';
}
/**
* Strip whitespace from end of the string.
*/
void BLI_str_rstrip(char *str)
{
for (int i = strlen(str) - 1; i > 0; i--) {
if (isspace(str[i])) {
str[i] = '\0';
}
else {
break;
}
}
}
/**
* Strip trailing zeros from a float, eg:
* 0.0000 -> 0.0