mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 00:57:26 +00:00
ui-contract: the icon-fill trial's white tint is marked; icon-trial-fixed-tint covers 4
This commit is contained in:
@@ -213,6 +213,7 @@ fn an_icon_with_a_fill_keeps_its_colour_under_the_tint() {
|
||||
register_app_icons(&FILLED_SET);
|
||||
let [r, g, b, a] = FILL_COLOR;
|
||||
let fill = Color32::from_rgba_unmultiplied(r, g, b, a);
|
||||
// design: allow[raw-colour/const](white is the tint that leaves colours unchanged: the fill keeps its colour under it too)
|
||||
for tint in [Color32::from_rgb(10, 200, 30), Color32::WHITE] {
|
||||
assert_eq!(painted(FILLED_NAME, tint), [fill, tint], "the fill keeps its colour and the icon takes the tint");
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ name = "icon-trial-fixed-tint"
|
||||
kind = "marker"
|
||||
rule = "raw-colour/const"
|
||||
path = "crates/ui-contract/src/testing/icon_trials.rs"
|
||||
reason = "A fixed layer keeps the colours it is drawn in: the trial expects the white tint that leaves them unchanged."
|
||||
count = 3
|
||||
reason = "A fixed layer keeps the colours it is drawn in: the trials expect the white tint that leaves them unchanged, and an icon's fill keeps its colour under it."
|
||||
count = 4
|
||||
|
||||
[[exception]]
|
||||
name = "face-runs-text-size"
|
||||
|
||||
Reference in New Issue
Block a user