diff options
author | Pablo Vazquez <pablovazquez> | 2021-10-17 19:43:25 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2021-10-17 19:49:59 +0300 |
commit | 962b17b3ca140aca3ccce94e0e39c6631f830f8d (patch) | |
tree | 55eb8c55dc1158dfa13a3230bf46b2777cdfa573 /source/blender/editors/screen | |
parent | 93544b641bd6687c9b0af3e203a4069977116a78 (diff) |
UI: Adjust header color when active instead of inactive
Currently, the background color of headers gets darkened when the editor is not active,
this makes it hard to theme, and adds contrast/noise when it's not needed.
This patch makes headers use the regular theme color when the editor is not active, so it
can be made to flush with the background more easily. And lightens the header (by +10,
same value as before) when the editor is active, providing the wanted highlight.
The motivations behind this change are:
* Simplify picking a theme color for headers.
* Widgets already become lighter on mouse hover, this change creates a connection with that concept.
Left: current master, inactive header is darkened.
Right: this patch, inactive header gets the theme color, active editor gets header in a slightly lighter color (like most widgets)
{F11052503, size=full, loop, autoplay}
Reviewed By: #user_interface, HooglyBoogly
Differential Revision: https://developer.blender.org/D12856
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 406f5c0904f..6b0b4d911cc 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2658,10 +2658,10 @@ static ThemeColorID region_background_color_id(const bContext *C, const ARegion case RGN_TYPE_HEADER: case RGN_TYPE_TOOL_HEADER: if (ED_screen_area_active(C) || ED_area_is_global(area)) { - return TH_HEADER; + return TH_HEADER_ACTIVE; } else { - return TH_HEADERDESEL; + return TH_HEADER; } case RGN_TYPE_PREVIEW: return TH_PREVIEW_BACK; |