Regression: Blender 4.0 Menu Item inner color does not match the color selected in the theme editor: #113009

Open
opened 2023-09-28 12:42:22 +02:00 by Ludvik Koutny · 10 comments
Contributor

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.13

Blender Version
Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-09-28 00:03, hash: 751c9ef620a0
Worked: 3.6

Short description of error
In 4.0, the selected menu item now uses Inner widget color, but this color doesn't match the color set in theme preferences:

Correct Regression
Mismatch2.png Mismatch1.png

Exact steps for others to reproduce the error

  1. In Blender 4.0, set the Inner Menu Item color
  2. Open a menu and hover over any menu item
    Result: The color doesn't match to the one selected in the UI
    Expected: The color matches to the one selected in the UI.
**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.13 **Blender Version** Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-09-28 00:03, hash: `751c9ef620a0` Worked: 3.6 **Short description of error** In 4.0, the selected menu item now uses Inner widget color, but this color doesn't match the color set in theme preferences: | Correct | Regression | | -- | -- | | ![Mismatch2.png](/attachments/d70b5eb8-1f56-4fca-8b71-70a386c715c0) | ![Mismatch1.png](/attachments/88aab2d5-de92-4cc5-a645-f89e442ac049) | **Exact steps for others to reproduce the error** 1. In Blender 4.0, set the Inner Menu Item color 2. Open a menu and hover over any menu item Result: The color doesn't match to the one selected in the UI Expected: The color matches to the one selected in the UI.
Ludvik Koutny added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-09-28 12:42:23 +02:00
Member

This looks like the hover color overlapped on top of the selected inner color.

This looks like the hover color overlapped on top of the selected inner color.
YimingWu added
Module
User Interface
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-09-28 16:24:24 +02:00
Author
Contributor

This looks like the hover color overlapped on top of the selected inner color.

To clarify, I have alpha value of that inner color set to 0, so that only the hovered menu item has the accent color.

> This looks like the hover color overlapped on top of the selected inner color. To clarify, I have alpha value of that inner color set to 0, so that only the hovered menu item has the accent color.
Member

Hi, thanks for the report. This is because we're blending between inner and text widget color: https://projects.blender.org/blender/blender/src/branch/main/source/blender/editors/interface/interface_widgets.cc#L2751

Not a bug, closing.
Let me know if I'm missing something and feel free to reopen the report.

Hi, thanks for the report. This is because we're blending between `inner` and `text` widget color: https://projects.blender.org/blender/blender/src/branch/main/source/blender/editors/interface/interface_widgets.cc#L2751 Not a bug, closing. Let me know if I'm missing something and feel free to reopen the report.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-09-30 08:56:23 +02:00
Author
Contributor

Hi, thanks for the report. This is because we're blending between inner and text widget color: https://projects.blender.org/blender/blender/src/branch/main/source/blender/editors/interface/interface_widgets.cc#L2751

Not a bug, closing.
Let me know if I'm missing something and feel free to reopen the report.

Well, once again this is a regression. I filled out Worked: 3.6.

3.6 uses different widget color for it, but the color matches:
image
There's just no reason it should not in 4.0.

Between this and #113022 someone has just messed with menu drawing code and broke theme customization in process by hardcoding some values. It makes no sense for 4.0 having broken theme customization to not be a bug. If it's treated with a simple shoulder shrug, than we may as well remove the theme editor completely as this sets precedent that breaking theme customization is ok going forward.

The code that blends inner and text color is clearly a mistake. It seems to be written by someone who didn't consider any other theme than the Default Dark.

> Hi, thanks for the report. This is because we're blending between `inner` and `text` widget color: https://projects.blender.org/blender/blender/src/branch/main/source/blender/editors/interface/interface_widgets.cc#L2751 > > Not a bug, closing. > Let me know if I'm missing something and feel free to reopen the report. Well, once again this is a regression. I filled out Worked: 3.6. 3.6 uses different widget color for it, but the color matches: ![image](/attachments/1086b652-36e9-41fc-9f5e-804bcc16d974) There's just no reason it should not in 4.0. Between this and https://projects.blender.org/blender/blender/issues/113022 someone has just messed with menu drawing code and broke theme customization in process by hardcoding some values. It makes no sense for 4.0 having broken theme customization to not be a bug. If it's treated with a simple shoulder shrug, than we may as well remove the theme editor completely as this sets precedent that breaking theme customization is ok going forward. The code that blends inner and text color is clearly a mistake. It seems to be written by someone who didn't consider any other theme than the Default Dark.
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-09-30 09:18:57 +02:00
Author
Contributor

I checked that piece of code and it's even worse. It seems to just straight up disregard some of the user defined theme colors and override them:

  else if (state->but_flag & UI_ACTIVE) {
    /* Regular hover. */
    color_blend_v3_v3(wt->wcol.inner, wt->wcol.text, 0.2f);
    copy_v3_v3_uchar(wt->wcol.text, wt->wcol.text_sel);
    wt->wcol.inner[3] = 255;
    wt->wcol.text[3] = 255;

This breaks readability some of the built in themes:
White:
image
Modo:
image

For comparison, white theme in 3.6:
image

I checked that piece of code and it's even worse. It seems to just straight up disregard some of the user defined theme colors and override them: ``` else if (state->but_flag & UI_ACTIVE) { /* Regular hover. */ color_blend_v3_v3(wt->wcol.inner, wt->wcol.text, 0.2f); copy_v3_v3_uchar(wt->wcol.text, wt->wcol.text_sel); wt->wcol.inner[3] = 255; wt->wcol.text[3] = 255; ``` This breaks readability some of the built in themes: White: ![image](/attachments/dc121328-4f95-4dda-94f5-6dc02c40acd3) Modo: ![image](/attachments/cd6b9756-53c4-42ca-b10a-cbbbbea4bcf7) For comparison, white theme in 3.6: ![image](/attachments/38b7f0a3-ebd7-44ee-8193-53f0050a3913)
Member

Between this and #113022 someone has just messed with menu drawing code and broke theme customization in process by hardcoding some values

For reference, this was done in 9f4b28bba8

The code that blends inner and text color is clearly a mistake. It seems to be written by someone who didn't consider any other theme than the Default Dark.

Yeah, we already have bug reports regarding that (for example: #112122)


In 4.0, the selected menu item now uses Inner widget color, but this color doesn't match the color set in theme preferences:

@Rawalanche , if I understand correctly, this report complains about the visual difference between hovered color and inner color.
In that case, this is directly related to your other report #113022 and #112122

> Between this and #113022 someone has just messed with menu drawing code and broke theme customization in process by hardcoding some values For reference, this was done in 9f4b28bba82dc7013a33ad94b6e761df6f49279d > The code that blends inner and text color is clearly a mistake. It seems to be written by someone who didn't consider any other theme than the Default Dark. Yeah, we already have bug reports regarding that (for example: #112122) - - - > In 4.0, the selected menu item now uses Inner widget color, but this color doesn't match the color set in theme preferences: @Rawalanche , if I understand correctly, this report complains about the visual difference between hovered color and `inner` color. In that case, this is directly related to your other report #113022 and #112122
Author
Contributor

Between this and #113022 someone has just messed with menu drawing code and broke theme customization in process by hardcoding some values

For reference, this was done in 9f4b28bba8

The code that blends inner and text color is clearly a mistake. It seems to be written by someone who didn't consider any other theme than the Default Dark.

Yeah, we already have bug reports regarding that (for example: #112122)


In 4.0, the selected menu item now uses Inner widget color, but this color doesn't match the color set in theme preferences:

@Rawalanche , if I understand correctly, this report complains about the visual difference between hovered color and inner color.
In that case, this is directly related to your other report #113022 and #112122

I don't think so. The other report is about the text color of the frozen entries. This note above was about text color of hovered entries.
image
On the picture above, 1. frozen menu item entry, 2. is hovered menu item entry.

If I understand this part of code correctly:

  else if (state->but_flag & UI_ACTIVE) {
    /* Regular hover. */
    color_blend_v3_v3(wt->wcol.inner, wt->wcol.text, 0.2f);
    copy_v3_v3_uchar(wt->wcol.text, wt->wcol.text_sel);
    wt->wcol.inner[3] = 255;
    wt->wcol.text[3] = 255;

Then it's responsible for modifying the color of the hovered menu item, not frozen menu item.

And why I think that this piece of code is clearly wrong is that widget colors have specific color exactly for the highlighted text:
image
So hardcoding wt->wcol.text[3] to 255 is clearly wrong. It should use the selected text color.

EDIT: Nevermind. The third element is alpha, so that's not wrong. It's just the color blend appears to be wrong.

> > Between this and #113022 someone has just messed with menu drawing code and broke theme customization in process by hardcoding some values > > For reference, this was done in 9f4b28bba82dc7013a33ad94b6e761df6f49279d > > > The code that blends inner and text color is clearly a mistake. It seems to be written by someone who didn't consider any other theme than the Default Dark. > > Yeah, we already have bug reports regarding that (for example: #112122) > - - - > > In 4.0, the selected menu item now uses Inner widget color, but this color doesn't match the color set in theme preferences: > > @Rawalanche , if I understand correctly, this report complains about the visual difference between hovered color and `inner` color. > In that case, this is directly related to your other report #113022 and #112122 I don't think so. The other report is about the text color of the frozen entries. This note above was about text color of hovered entries. ![image](/attachments/ba028443-d598-471c-b236-3029e8f460b4) On the picture above, 1. frozen menu item entry, 2. is hovered menu item entry. If I understand this part of code correctly: ``` else if (state->but_flag & UI_ACTIVE) { /* Regular hover. */ color_blend_v3_v3(wt->wcol.inner, wt->wcol.text, 0.2f); copy_v3_v3_uchar(wt->wcol.text, wt->wcol.text_sel); wt->wcol.inner[3] = 255; wt->wcol.text[3] = 255; ``` Then it's responsible for modifying the color of the **hovered** menu item, not **frozen** menu item. And why I think that this piece of code is clearly wrong is that widget colors have specific color exactly for the highlighted text: ![image](/attachments/2b7746b7-d791-43b2-9d2e-f6e336c193b3) So hardcoding wt->wcol.text[3] to 255 is clearly wrong. It should use the selected text color. EDIT: Nevermind. The third element is alpha, so that's not wrong. It's just the color blend appears to be wrong.
Member

This breaks readability some of the built in themes:

The hover color straight up goes to complete black on my blender light theme (I guess also broken by 9f4b28bba8 or relevant changes), which is of course readable but not very ideal.

图片

> This breaks readability some of the built in themes: The hover color straight up goes to complete black on my blender light theme (I guess also broken by 9f4b28bba82dc7013a33ad94b6e761df6f49279d or relevant changes), which is of course readable but not very ideal. ![图片](/attachments/3cbf1700-0c3a-460a-a7e4-cc64806b9391)
Member

I think I'll reopen this and maybe @Harley should look at it?

cc @pablovazquez the theme color could use some investigation as well 😅

I think I'll reopen this and maybe @Harley should look at it? cc @pablovazquez the theme color could use some investigation as well 😅
YimingWu added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-10-03 15:31:10 +02:00
Member

@ChengduLittleA : can you check this PR #112380 ?

@ChengduLittleA : can you check this PR https://projects.blender.org/blender/blender/pulls/112380 ?
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#113009
No description provided.