Fix #94148: Top bar, Status bar Header Colors Differ from Theme Setting #111265

Merged
Harley Acheson merged 1 commits from Rawalanche/blender:fix-topbar-color into main 2023-08-26 00:16:28 +02:00
Contributor

Fixes the Top and Status bars having their specified theme colors
incorrectly modified by highlight effect intended for active editor
headers only


Editor header colors get a slight "lift" when active. A long time ago this was achieved in an odd way: we would darken all headers except for the active one. This worked, but meant that all headers except for one used a color that was slightly different from that which is specified in the theme. This made it hard for theme designers to select a particular color since what would be displayed is slightly different.

When global areas were added (Top bar and status bar), we didn't want those areas to have the hover effect. So these areas were treated specially in region_background_color_id so they always use TH_HEADER.

We later changed to doing highlighting in a better way, lightening just the active header. This meant that for the usual case of an inactive area they used the theme color. This made theme designers happy.

However, for this change the two colors were just swapped. This meant that the global areas currently always use the highlighted color instead of the theme color. In a nutshell the logic should have been changed at that time. This PR correct this so that global areas always use the theme color.

Fixes the Top and Status bars having their specified theme colors incorrectly modified by highlight effect intended for active editor headers only --- Editor header colors get a slight "lift" when active. A long time ago this was achieved in an odd way: we would **darken** all headers _except_ for the active one. This worked, but meant that all headers except for one used a color that was slightly different from that which is specified in the theme. This made it hard for theme designers to select a particular color since what would be displayed is slightly different. When global areas were added (Top bar and status bar), we didn't want those areas to have the hover effect. So these areas were treated specially in `region_background_color_id` so they always use TH_HEADER. We later changed to doing highlighting in a better way, **lightening** just the _active_ header. This meant that for the usual case of an inactive area they used the theme color. This made theme designers happy. However, for this change the two colors were just swapped. This meant that the global areas currently always use the highlighted color instead of the theme color. In a nutshell the logic should have been changed at that time. This PR correct this so that global areas always use the theme color.
Ludvik Koutny added 1 commit 2023-08-18 15:04:48 +02:00
5c70a0db78 Fix #94148: Top bar and Status bar have hardcoded color offset
Fixed Top and Status bars having their specified theme colors incorrectly
modified by highlight effect intended for active editor headers only
Jesse Yurkovich added the
Module
User Interface
label 2023-08-22 23:30:36 +02:00
Harley Acheson added this to the User Interface project 2023-08-25 22:30:05 +02:00
Harley Acheson removed the
Module
User Interface
label 2023-08-25 22:31:11 +02:00
Harley Acheson changed title from Fix #94148: Top bar and Status bar have hardcoded color offset to Fix #94148: Top bar, Status bar Header Colors Differ from Theme Setting 2023-08-25 22:54:20 +02:00
Harley Acheson requested review from Harley Acheson 2023-08-25 23:10:10 +02:00
Harley Acheson requested review from Pablo Vazquez 2023-08-25 23:10:27 +02:00
Harley Acheson approved these changes 2023-08-25 23:11:33 +02:00
Member

@Rawalanche

Hoping you don't mind that I edited your initial comment a bit with some history and details to make it easier to review.

@pablovazquez

This PR is correct. I edited the initial comment to make it as clear as possible. This would mean though that Top Bar and Status bar header colors will be slightly darker. But they will exactly match the colors in the theme. So we probably want to accept this but also adjust the theme colors slightly to compensate if desired.

@Rawalanche Hoping you don't mind that I edited your initial comment a bit with some history and details to make it easier to review. @pablovazquez This PR is correct. I edited the initial comment to make it as clear as possible. This would mean though that Top Bar and Status bar header colors will be slightly darker. But they will exactly match the colors in the theme. So we probably want to accept this but also adjust the theme colors slightly to compensate if desired.
Pablo Vazquez approved these changes 2023-08-26 00:09:24 +02:00
Member

Thanks for the fix!

A quick tip for future patches: if there are visual changes, a before and after image helps a lot to reviewers and other community members that don't compile Blender but still like to give feedback. Thanks!

Thanks for the fix! A quick tip for future patches: if there are visual changes, a before and after image helps a lot to reviewers and other community members that don't compile Blender but still like to give feedback. Thanks!
Member

Thanks @Rawalanche !!

Thanks @Rawalanche !!
Harley Acheson merged commit d86d2a41e0 into main 2023-08-26 00:16:28 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#111265
No description provided.