Remove widget emboss #42228

Closed
opened 2014-10-14 21:56:12 +02:00 by Jonathan Williamson · 14 comments

Currently the embossing of UI widgets is hard-coded, often resulting in bad highlights/shadows in themes. It is particularly noticeable in dark themes.

Per @billrey's mockups in #38037, I think it's time we remove the embossing from UI widgets. This use to be an option in the theme preferences, but we are already overloaded with options.

I propose we remove embossing entirely, yielding a more modern, flat UI style that is more easily theme able and clean.

This is actually quite a subtle change in most places. For example, here is the default them with and without embossing:
Screen_Shot_2014-10-14_at_1.38.31_PM.png
Screen_Shot_2014-10-14_at_1.38.18_PM.png

The change is more noticeable on darker themes, such as Graph:
Screen_Shot_2014-10-14_at_1.36.30_PM.png
Screen_Shot_2014-10-14_at_1.37.12_PM.png

I am willing/able to undertake this myself. I've already been experimenting with the embossing code and it's not difficult. The main challenge will be cleaning up the various remnants of the now defunct emboss theme option.

Currently the embossing of UI widgets is hard-coded, often resulting in bad highlights/shadows in themes. It is particularly noticeable in dark themes. Per @billrey's mockups in #38037, I think it's time we remove the embossing from UI widgets. This use to be an option in the theme preferences, but we are already overloaded with options. I propose we remove embossing entirely, yielding a more modern, flat UI style that is more easily theme able and clean. This is actually quite a subtle change in most places. For example, here is the default them with and without embossing: ![Screen_Shot_2014-10-14_at_1.38.31_PM.png](https://archive.blender.org/developer/F116725/Screen_Shot_2014-10-14_at_1.38.31_PM.png) ![Screen_Shot_2014-10-14_at_1.38.18_PM.png](https://archive.blender.org/developer/F116727/Screen_Shot_2014-10-14_at_1.38.18_PM.png) The change is more noticeable on darker themes, such as *Graph*: ![Screen_Shot_2014-10-14_at_1.36.30_PM.png](https://archive.blender.org/developer/F116729/Screen_Shot_2014-10-14_at_1.36.30_PM.png) ![Screen_Shot_2014-10-14_at_1.37.12_PM.png](https://archive.blender.org/developer/F116730/Screen_Shot_2014-10-14_at_1.37.12_PM.png) I am willing/able to undertake this myself. I've already been experimenting with the embossing code and it's not difficult. The main challenge will be cleaning up the various remnants of the now defunct emboss theme option.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Pablo Vazquez was assigned by Jonathan Williamson 2014-10-14 21:56:12 +02:00
Author
Member

Added subscribers: @billrey, @ThomasDinges, @JonathanWilliamson, @PawelLyczkowski-1, @ideasman42, @JulianEisel, @mont29, @pablovazquez, @liquidape

Added subscribers: @billrey, @ThomasDinges, @JonathanWilliamson, @PawelLyczkowski-1, @ideasman42, @JulianEisel, @mont29, @pablovazquez, @liquidape

This has my support. This would clean the GUI up in dark themes, while not impacting the light themes that much.

This has my support. This would clean the GUI up in dark themes, while not impacting the light themes that much.
Author
Member

Here are a few more screenshots showing with and without embossing. You'll notice that the emboss (or lack there of) is quite subtle in the default theme, but sticks out strongly in the darker Graph theme.

Default theme with emboss:
Screen_Shot_2014-10-14_at_3.12.18_PM.png
Default theme without emboss:
Screen_Shot_2014-10-14_at_3.12.28_PM.png
Graph theme with emboss:
Screen_Shot_2014-10-14_at_3.11.48_PM.png
Graph theme without emboss:Screen_Shot_2014-10-14_at_3.11.54_PM.png

Here are a few more screenshots showing with and without embossing. You'll notice that the emboss (or lack there of) is quite subtle in the default theme, but sticks out strongly in the darker *Graph* theme. **Default theme with emboss:** ![Screen_Shot_2014-10-14_at_3.12.18_PM.png](https://archive.blender.org/developer/F116733/Screen_Shot_2014-10-14_at_3.12.18_PM.png) **Default theme without emboss:** ![Screen_Shot_2014-10-14_at_3.12.28_PM.png](https://archive.blender.org/developer/F116735/Screen_Shot_2014-10-14_at_3.12.28_PM.png) **Graph theme with emboss:** ![Screen_Shot_2014-10-14_at_3.11.48_PM.png](https://archive.blender.org/developer/F116737/Screen_Shot_2014-10-14_at_3.11.48_PM.png) **Graph theme without emboss:**![Screen_Shot_2014-10-14_at_3.11.54_PM.png](https://archive.blender.org/developer/F116739/Screen_Shot_2014-10-14_at_3.11.54_PM.png)
Member

Hi,

Emboss has a function, it's a way to make the element pop, the reason it doesn't always work now it's because it's hardcoded to white (well, glColor4f(1.0f, 1.0f, 1.0f, 0.02f) )

/source/blender/editors/interface/interface_widgets.c

if (wtb->emboss) {
    glColor4f(1.0f, 1.0f, 1.0f, 0.02f);
}

So I wouldn't remove it completely, but allow to change it's color/alpha (same we do now with Text Style), so we can make it fit all themes. If its alpha is set to 0, we skip the drawing completely.

Personally, I have it changed to black (glColor4f(0.0f, 0.0f, 0.0f, 0.02f)) to work like a subtle shadow.

Example of emboss turned into black for a subtle drop shadow effect:
graph_defaultflat.png
(ignore the other UI tweaks in this branch :)

Being able to change the color/alpha of emboss will allow us to keep a classic 2.5 (and 2.4!) theme identical as it is now, a flat theme without, and the drop shadow effect if needed. While still taking the OGL advantage of not drawing it in case its alpha is 0.

Hi, Emboss has a function, it's a way to make the element pop, the reason it doesn't always work now it's because it's hardcoded to white (well, glColor4f(1.0f, 1.0f, 1.0f, 0.02f) ) ``` /source/blender/editors/interface/interface_widgets.c ``` ``` if (wtb->emboss) { glColor4f(1.0f, 1.0f, 1.0f, 0.02f); } ``` So I wouldn't remove it completely, but allow to change it's color/alpha (same we do now with Text Style), so we can make it fit all themes. If its alpha is set to 0, we skip the drawing completely. Personally, I have it changed to black (glColor4f(0.0f, 0.0f, 0.0f, 0.02f)) to work like a subtle shadow. Example of emboss turned into black for a subtle drop shadow effect: ![graph_defaultflat.png](https://archive.blender.org/developer/F116946/graph_defaultflat.png) (ignore the other UI tweaks in this branch :) Being able to change the color/alpha of emboss will allow us to keep a *classic* 2.5 (and 2.4!) theme identical as it is now, a flat theme without, and the drop shadow effect if needed. While still taking the OGL advantage of not drawing it in case its alpha is 0.

Think this can work as a theme option without much trouble, then we can propose changing defaults after.

Think this can work as a theme option without much trouble, then we can propose changing defaults after.
Member

+1 to be theme option (RGBA?), by default to white 1.0f/alpha 0.02f so it doesn't affect the current theme.

+1 to be theme option (RGBA?), by default to white 1.0f/alpha 0.02f so it doesn't affect the current theme.
Author
Member

That's a good example @venomgfx.

@ideasman42 didn't it use to be a theme option? Any idea why it was disabled? I seem to remember it not making the leap to 2.5x.

I'll dig in and see if I can make it an option.

That's a good example @venomgfx. @ideasman42 didn't it use to be a theme option? Any idea why it was disabled? I seem to remember it not making the leap to 2.5x. I'll dig in and see if I can make it an option.
Member

It was never really an option IIRC. It's the UI Draw Type setting that allowed different "styles", from which some of them had emboss and some didn't.
blender_ui_24_emboss.gif

It was never really an option IIRC. It's the UI Draw Type setting that allowed different "styles", from which some of them had emboss and some didn't. ![blender_ui_24_emboss.gif](https://archive.blender.org/developer/F117022/blender_ui_24_emboss.gif)
Author
Member

Okay I've added a new diff to add the Theme option for the emboss feature. By default it's set to same color as was previously hard-coded.

Note: I had some trouble getting everything to align in the User Preferences. Perhaps @ThomasDinges has some suggestions?

Okay I've added a new diff to add the **Theme option** for the emboss feature. By default it's set to same color as was previously hard-coded. **Note**: I had some trouble getting everything to align in the User Preferences. Perhaps @ThomasDinges has some suggestions?

Added subscriber: @Januz

Added subscriber: @Januz

This issue was referenced by 6c2ce7a382

This issue was referenced by 6c2ce7a3828e92083dfdad85eb683f4d27ed852b
Author
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author
Member

Closed by commit 6c2ce7a382.

Closed by commit 6c2ce7a382.
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
6 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#42228
No description provided.