Fix #122381: Changes to Text Overlay Colors
Show white text and black outline when dark, black text and white outline when light. Slight darkening of TH_TIME_GP_KEYFRAME and the red used for slow FPS to better work with varying backgrounds. Pull Request: https://projects.blender.org/blender/blender/pulls/122449
This commit is contained in:
committed by
Harley Acheson
parent
ec36412c45
commit
3ee8a75e8e
@@ -344,7 +344,7 @@ const bTheme U_theme_default = {
|
||||
.bone_locked_weight = RGBA(0xff000080),
|
||||
.cframe = RGBA(0x4772b3ff),
|
||||
.time_keyframe = RGBA(0xddd700ff),
|
||||
.time_gp_keyframe = RGBA(0xb5e61dff),
|
||||
.time_gp_keyframe = RGBA(0x7a9b14ff),
|
||||
.freestyle_edge_mark = RGBA(0x7fff7fff),
|
||||
.freestyle_face_mark = RGBA(0x7fff7f4d),
|
||||
.nurb_uline = RGBA(0x909000ff),
|
||||
|
||||
@@ -29,7 +29,7 @@ extern "C" {
|
||||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 46
|
||||
#define BLENDER_FILE_SUBVERSION 47
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
||||
|
||||
@@ -160,6 +160,10 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
|
||||
FROM_DEFAULT_V4_UCHAR(space_image.asset_shelf.header_back);
|
||||
}
|
||||
|
||||
if (!USER_VERSION_ATLEAST(402, 47)) {
|
||||
FROM_DEFAULT_V4_UCHAR(space_view3d.time_gp_keyframe);
|
||||
}
|
||||
|
||||
/**
|
||||
* Always bump subversion in BKE_blender_version.h when adding versioning
|
||||
* code here, and wrap it inside a USER_VERSION_ATLEAST check.
|
||||
|
||||
@@ -2629,7 +2629,7 @@ void ED_scene_draw_fps(const Scene *scene, int xoffset, int *yoffset)
|
||||
if (state.fps_average + 0.5f < state.fps_target) {
|
||||
/* Always show fractional when under performing. */
|
||||
show_fractional = true;
|
||||
UI_FontThemeColor(font_id, TH_REDALERT);
|
||||
BLF_color4ub(font_id, 225, 36, 36, 255);
|
||||
}
|
||||
|
||||
if (show_fractional) {
|
||||
|
||||
@@ -85,17 +85,17 @@ void ED_view3d_text_colors_get(const Scene *scene,
|
||||
r_shadow_color[3] = 0.8f;
|
||||
|
||||
/* White text, black shadow. Unless view background
|
||||
* is very dark; in that case black text, white shadow. */
|
||||
float bg_color[4];
|
||||
* is very light; in that case black text, white shadow. */
|
||||
float bg_color[3];
|
||||
ED_view3d_background_color_get(scene, v3d, bg_color);
|
||||
float lightness = rgb_to_grayscale(bg_color);
|
||||
if (lightness > 0.04f) {
|
||||
copy_v3_fl(r_text_color, 1.0f);
|
||||
copy_v3_fl(r_shadow_color, 0.0f);
|
||||
if (lightness > 0.6f) {
|
||||
copy_v3_fl(r_text_color, 0.0f);
|
||||
copy_v3_v3(r_shadow_color, bg_color);
|
||||
}
|
||||
else {
|
||||
copy_v3_fl(r_text_color, 0.2f);
|
||||
copy_v3_fl(r_shadow_color, 1.0f);
|
||||
copy_v3_fl(r_text_color, 0.9f);
|
||||
copy_v3_fl(r_shadow_color, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user