UI: Theme: Allow transparency when editing text in widgets #112090

Merged
Pablo Vazquez merged 1 commits from pablovazquez/blender:ui-widgets-list-item-transparency into main 2023-09-14 19:28:38 +02:00
Member

The 'inner' color setting in widgets is used as background for selected text.
The setting supports alpha but it's not used when drawing.

This patch allows transparency in both text and background, to allow blending
the selected color with whatever is underneath. Making theming more
flexible, especially since the same property is used in different backgrounds.

Note: this doesn't affect the default themes since all of them have the alpha
component in inner at 1.0.

The 'inner' color setting in widgets is used as background for selected text. The setting supports alpha but it's not used when drawing. This patch allows transparency in both text and background, to allow blending the selected color with whatever is underneath. Making theming more flexible, especially since the same property is used in different backgrounds. <video src="/attachments/ae68e270-7fc2-4a02-8d95-0bf558a2fde4" title="ui_theme_list_item_alpha.mp4" controls></video> Note: this doesn't affect the default themes since all of them have the alpha component in inner at `1.0`.
Pablo Vazquez added the
Module
User Interface
label 2023-09-07 17:35:40 +02:00
Pablo Vazquez added 1 commit 2023-09-07 17:35:54 +02:00
9b588d43cd UI: Theme: Allow transparency when editing text in widgets
The 'inner' color in widgets is used as background for selected text.

The color setting supports alpha but it's not used.

This patch moves the clearing of `GPU_blend` after drawing both the
text and background colors so alpha is now supported for these.
Author
Member

Some context, I ran into this when thinking on how to fix #112032.
I wanted to use a slightly transparent white color that would "lighten" up any background (like active blue or dark or anything undernath).

Some context, I ran into this when thinking on how to fix #112032. I wanted to use a slightly transparent white color that would "lighten" up any background (like active blue or dark or anything undernath).
Pablo Vazquez added this to the User Interface project 2023-09-08 01:23:18 +02:00
Pablo Vazquez requested review from Julian Eisel 2023-09-13 18:00:55 +02:00
Julian Eisel approved these changes 2023-09-14 17:59:07 +02:00
Pablo Vazquez merged commit 2ec2e52a90 into main 2023-09-14 19:28:38 +02:00
Pablo Vazquez deleted branch ui-widgets-list-item-transparency 2023-09-14 19:28:45 +02:00
Sign in to join this conversation.
No reviewers
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
2 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#112090
No description provided.