Enhance color logic for phantom elements to improve visual distinction based on collision status (#42710)
This change modifies the color assignment for phantom elements in the editor. If a phantom element collides with existing elements, it now uses a custom color based on the theme's debugger accent with reduced opacity. Otherwise, it defaults to the hint color. BEFORE:  AFTER:  Release Notes: - Enhanced color logic for phantom elements to improve visual distinction based on collision status. --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
@@ -8420,8 +8420,14 @@ impl Editor {
|
||||
(true, true) => ui::IconName::DebugDisabledLogBreakpoint,
|
||||
};
|
||||
|
||||
let color = cx.theme().colors();
|
||||
|
||||
let color = if is_phantom {
|
||||
Color::Hint
|
||||
if collides_with_existing {
|
||||
Color::Custom(color.debugger_accent.blend(color.text.opacity(0.6)))
|
||||
} else {
|
||||
Color::Hint
|
||||
}
|
||||
} else if is_rejected {
|
||||
Color::Disabled
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user