Top bar and Status bar have hardcoded color offset #94148

Closed
opened 2021-12-16 12:23:02 +01:00 by Ludvik Koutny · 5 comments
Contributor

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.76

Blender Version
Broken: version: 3.0.0, branch: SelectThrough (modified), commit date: 2021-12-15 12:21, hash: 6349dd43b1
Worked: 2.93 and earlier

Short description of error
Blender 3.0 has introduced hardcoded color offset to UI header and footer, making the theme creation and maintenance once again more difficult. The accumulation of these mistakes makes already very difficult theme creation, editing and maintenance even more difficult in newer versions.

These two areas are set to be the exact same hex color:
image.png

Yet, when the same gray hex color is used, the colors of the elements are different:
image.png
Exact steps for others to reproduce the error

  1. In theme editor, set Top Bar > Theme Space > Header to a dark gray color
  2. In theme editor, set User Interface > Styles > Editor Outline to the exact same dark gray color
    Result: The colors displayed in the UI are not matching despite being set to same color
    Expected: The colors are identical
**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.76 **Blender Version** Broken: version: 3.0.0, branch: SelectThrough (modified), commit date: 2021-12-15 12:21, hash: `6349dd43b1` Worked: 2.93 and earlier **Short description of error** Blender 3.0 has introduced hardcoded color offset to UI header and footer, making the theme creation and maintenance once again more difficult. The accumulation of these mistakes makes already very difficult theme creation, editing and maintenance even more difficult in newer versions. These two areas are set to be the exact same hex color: ![image.png](https://archive.blender.org/developer/F12753128/image.png) Yet, when the same gray hex color is used, the colors of the elements are different: ![image.png](https://archive.blender.org/developer/F12753130/image.png) **Exact steps for others to reproduce the error** 1. In theme editor, set Top Bar > Theme Space > Header to a dark gray color 2. In theme editor, set User Interface > Styles > Editor Outline to the exact same dark gray color Result: The colors displayed in the UI are not matching despite being set to same color Expected: The colors are identical

It is set to use the "active" style for the status and top bar.

I would say it is a mistake in e89fefdc69.

lang=c
static ThemeColorID region_background_color_id(const bContext *C, const ARegion *region)
{
  ScrArea *area = CTX_wm_area(C);

  switch (region->regiontype) {
    case RGN_TYPE_HEADER:
    case RGN_TYPE_TOOL_HEADER:
      if (ED_screen_area_active(C) || ED_area_is_global(area)) {
        return TH_HEADER_ACTIVE;
      }
      else {
        return TH_HEADER;
      }
    case RGN_TYPE_PREVIEW:
      return TH_PREVIEW_BACK;
    default:
      return TH_BACK;
  }
}
It is set to use the "active" style for the status and top bar. I would say it is a mistake in e89fefdc69. ``` lang=c static ThemeColorID region_background_color_id(const bContext *C, const ARegion *region) { ScrArea *area = CTX_wm_area(C); switch (region->regiontype) { case RGN_TYPE_HEADER: case RGN_TYPE_TOOL_HEADER: if (ED_screen_area_active(C) || ED_area_is_global(area)) { return TH_HEADER_ACTIVE; } else { return TH_HEADER; } case RGN_TYPE_PREVIEW: return TH_PREVIEW_BACK; default: return TH_BACK; } } ```
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:22:37 +01:00
Member

I don't think this is an issue anymore, is it? Since the highlight effect is only when the mouse is over the current editor.

I don't think this is an issue anymore, is it? Since the highlight effect is only when the mouse is over the current editor.

Since the highlight effect is only when the mouse is over the current editor.

But the status bar and top bar always like the mouse is over.

if (ED_screen_area_active(C) || ED_area_is_global(area)) {
  return TH_HEADER_ACTIVE;
}

It should be like: if 'area_active' and not 'area_is_global'.

> Since the highlight effect is only when the mouse is over the current editor. But the status bar and top bar always like the mouse is over. ``` if (ED_screen_area_active(C) || ED_area_is_global(area)) { return TH_HEADER_ACTIVE; } ``` It should be like: if 'area_active' and not 'area_is_global'.
Author
Contributor

I don't think this is an issue anymore, is it? Since the highlight effect is only when the mouse is over the current editor.

No, this is not the highlight effect of individual editor's menu bar, it's the color of the main menu bar, the one with workspace tabs.

> I don't think this is an issue anymore, is it? Since the highlight effect is only when the mouse is over the current editor. No, this is not the highlight effect of individual editor's menu bar, it's the color of the main menu bar, the one with workspace tabs.
Member

It should be like: if 'area_active' and not 'area_is_global'.

Could you please make a pull request so it's easier to test and approve? Thanks!

No, this is not the highlight effect of individual editor's menu bar, it's the color of the main menu bar, the one with workspace tabs.

I see, the title then shouldn't be UI Header and Footer have hardcoded color offset, more like Top bar and Status bar have hardcoded color offset. Could you please edit it?

> It should be like: if 'area_active' and not 'area_is_global'. Could you please make a pull request so it's easier to test and approve? Thanks! > No, this is not the highlight effect of individual editor's menu bar, it's the color of the main menu bar, the one with workspace tabs. I see, the title then shouldn't be `UI Header and Footer have hardcoded color offset`, more like `Top bar and Status bar have hardcoded color offset`. Could you please edit it?
Ludvik Koutny changed title from UI Header and Footer have hardcoded color offset to Top bar and Status bar have hardcoded color offset 2023-08-18 12:18:24 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-08-26 00:16:30 +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#94148
No description provided.