Fix errors in theme2

This commit is contained in:
Antonio Scandurra 2023-11-30 12:08:00 +01:00
parent d2c1897385
commit fac029b808
2 changed files with 64 additions and 42 deletions

View file

@ -23,6 +23,18 @@ impl From<SharedString> for ImageSource {
}
}
impl From<&'static str> for ImageSource {
fn from(uri: &'static str) -> Self {
Self::Uri(uri.into())
}
}
impl From<String> for ImageSource {
fn from(uri: String) -> Self {
Self::Uri(uri.into())
}
}
impl From<Arc<ImageData>> for ImageSource {
fn from(value: Arc<ImageData>) -> Self {
Self::Data(value)