Move Canvas and QRCode to iced crate
Rename `canvas` modules to `geometry` in graphics subcrates
This commit is contained in:
parent
d13d19ba35
commit
6cc48b5c62
39 changed files with 140 additions and 148 deletions
|
|
@ -1,24 +0,0 @@
|
|||
use crate::widget::canvas::Gradient;
|
||||
use crate::Color;
|
||||
|
||||
/// The coloring style of some drawing.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum Style {
|
||||
/// A solid [`Color`].
|
||||
Solid(Color),
|
||||
|
||||
/// A [`Gradient`] color.
|
||||
Gradient(Gradient),
|
||||
}
|
||||
|
||||
impl From<Color> for Style {
|
||||
fn from(color: Color) -> Self {
|
||||
Self::Solid(color)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Gradient> for Style {
|
||||
fn from(gradient: Gradient) -> Self {
|
||||
Self::Gradient(gradient)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue