fix: draw color picker handle on top of gradient
This commit is contained in:
parent
cfa1adaf46
commit
47dedfde74
1 changed files with 41 additions and 31 deletions
|
|
@ -606,39 +606,49 @@ where
|
||||||
(1.0 - self.active_color.value).mul_add(bounds.height, bounds.position().y)
|
(1.0 - self.active_color.value).mul_add(bounds.height, bounds.position().y)
|
||||||
- handle_radius,
|
- handle_radius,
|
||||||
);
|
);
|
||||||
renderer.fill_quad(
|
renderer.with_layer(
|
||||||
Quad {
|
Rectangle {
|
||||||
bounds: Rectangle {
|
x,
|
||||||
x,
|
y,
|
||||||
y,
|
width: handle_radius.mul_add(2.0, 1.0),
|
||||||
width: handle_radius.mul_add(2.0, 1.0),
|
height: handle_radius.mul_add(2.0, 1.0),
|
||||||
height: handle_radius.mul_add(2.0, 1.0),
|
|
||||||
},
|
|
||||||
border: Border {
|
|
||||||
width: 1.0,
|
|
||||||
color: t.palette.neutral_5.into(),
|
|
||||||
radius: (1.0 + handle_radius).into(),
|
|
||||||
},
|
|
||||||
shadow: Shadow::default(),
|
|
||||||
},
|
},
|
||||||
Color::TRANSPARENT,
|
|renderer| {
|
||||||
);
|
renderer.fill_quad(
|
||||||
renderer.fill_quad(
|
Quad {
|
||||||
Quad {
|
bounds: Rectangle {
|
||||||
bounds: Rectangle {
|
x,
|
||||||
x,
|
y,
|
||||||
y,
|
width: handle_radius.mul_add(2.0, 1.0),
|
||||||
width: handle_radius * 2.0,
|
height: handle_radius.mul_add(2.0, 1.0),
|
||||||
height: handle_radius * 2.0,
|
},
|
||||||
},
|
border: Border {
|
||||||
border: Border {
|
width: 1.0,
|
||||||
width: 1.0,
|
color: t.palette.neutral_5.into(),
|
||||||
color: t.palette.neutral_10.into(),
|
radius: (1.0 + handle_radius).into(),
|
||||||
radius: handle_radius.into(),
|
},
|
||||||
},
|
shadow: Shadow::default(),
|
||||||
shadow: Shadow::default(),
|
},
|
||||||
|
Color::TRANSPARENT,
|
||||||
|
);
|
||||||
|
renderer.fill_quad(
|
||||||
|
Quad {
|
||||||
|
bounds: Rectangle {
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
width: handle_radius * 2.0,
|
||||||
|
height: handle_radius * 2.0,
|
||||||
|
},
|
||||||
|
border: Border {
|
||||||
|
width: 1.0,
|
||||||
|
color: t.palette.neutral_10.into(),
|
||||||
|
radius: handle_radius.into(),
|
||||||
|
},
|
||||||
|
shadow: Shadow::default(),
|
||||||
|
},
|
||||||
|
Color::TRANSPARENT,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
Color::TRANSPARENT,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue