diff --git a/crates/color-ui/src/ui/compare.rs b/crates/color-ui/src/ui/compare.rs index d45e75509f..ccd4720c5a 100644 --- a/crates/color-ui/src/ui/compare.rs +++ b/crates/color-ui/src/ui/compare.rs @@ -4,7 +4,7 @@ use craft_behavior::{Metrics, Mixed, PartKey, Sense}; use craft_theme::Srgba; use craft_ui::contract::{Access, Common, Component, Cx, MeasureCx, Name, Outcome, PaintUi, PartsCx, Props as _, Role}; use craft_ui::display::{Shade, Text}; -use craft_ui::primitives::{PaintShape, StrokeWidth, TextRun}; +use craft_ui::primitives::{PaintShape, StrokeWidth, TextRun, WellFill}; use craft_ui::runtime::env::Label; use craft_ui::style::{ComponentStyle, FocusLook, StyleColor, StyleCx, TypeRole}; use egui::{CornerRadius, Rect, Response, Vec2, pos2}; @@ -83,6 +83,7 @@ pub struct CompareSwatch<'a> { new: Mixed, current: Mixed, warnings: &'a [ColorWarning], + no_current: bool, restore: bool, warning: Option, } @@ -90,7 +91,23 @@ pub struct CompareSwatch<'a> { impl<'a> CompareSwatch<'a> { /// A block named `label` ("New color", the new half's name) showing `new` over `current`. pub fn new(label: impl Into