Merge remote-tracking branch 'origin/main' into feat/voice-quality
@@ -79,6 +79,7 @@ fn image_view(
79
79
open_image: Option<&ImageActions>,
80
80
) -> AnyElement {
81
81
let (width, height) = image_size(image, directory);
82
let image_id = ElementId::Name(format!("{id}-image").into());
82
83
let frame = div()
83
84
.id(ElementId::Name(id.into()))
84
85
.relative()
@@ -112,6 +113,7 @@ fn image_view(
112
113
.cursor_pointer()
113
114
.child(
114
115
img(entry.path.clone())
116
.id(image_id)
115
117
.size_full()
116
118
.rounded(px(IMAGE_RADIUS))
117
119
.object_fit(ObjectFit::Cover),
@@ -178,6 +180,7 @@ pub fn file_badge(kind: FileKind, size: f32) -> Div {
178
180
179
181
fn local_image_view(image: &LocalImage, id: String) -> AnyElement {
180
182
let (width, height) = fit_image(image.size);
183
let image_id = ElementId::Name(format!("{id}-image").into());
181
184
div()
182
185
.id(ElementId::Name(id.into()))
183
186
.w(px(width))
@@ -188,6 +191,7 @@ fn local_image_view(image: &LocalImage, id: String) -> AnyElement {
188
191
.overflow_hidden()
189
192
.child(
190
193
img(image.image.clone())
194
.id(image_id)
191
195
.size_full()
192
196
.rounded(px(IMAGE_RADIUS))
193
197
.object_fit(ObjectFit::Cover),
@@ -79,6 +79,7 @@ fn image_view(79
open_image: Option<&ImageActions>,79
open_image: Option<&ImageActions>,80
) -> AnyElement {80
) -> AnyElement {81
let (width, height) = image_size(image, directory);81
let (width, height) = image_size(image, directory);82
let image_id = ElementId::Name(format!("{id}-image").into());82
let frame = div()83
let frame = div()83
.id(ElementId::Name(id.into()))84
.id(ElementId::Name(id.into()))84
.relative()85
.relative()@@ -112,6 +113,7 @@ fn image_view(112
.cursor_pointer()113
.cursor_pointer()113
.child(114
.child(114
img(entry.path.clone())115
img(entry.path.clone())116
.id(image_id)115
.size_full()117
.size_full()116
.rounded(px(IMAGE_RADIUS))118
.rounded(px(IMAGE_RADIUS))117
.object_fit(ObjectFit::Cover),119
.object_fit(ObjectFit::Cover),@@ -178,6 +180,7 @@ pub fn file_badge(kind: FileKind, size: f32) -> Div {178
180
179
fn local_image_view(image: &LocalImage, id: String) -> AnyElement {181
fn local_image_view(image: &LocalImage, id: String) -> AnyElement {180
let (width, height) = fit_image(image.size);182
let (width, height) = fit_image(image.size);183
let image_id = ElementId::Name(format!("{id}-image").into());181
div()184
div()182
.id(ElementId::Name(id.into()))185
.id(ElementId::Name(id.into()))183
.w(px(width))186
.w(px(width))@@ -188,6 +191,7 @@ fn local_image_view(image: &LocalImage, id: String) -> AnyElement {188
.overflow_hidden()191
.overflow_hidden()189
.child(192
.child(190
img(image.image.clone())193
img(image.image.clone())194
.id(image_id)191
.size_full()195
.size_full()192
.rounded(px(IMAGE_RADIUS))196
.rounded(px(IMAGE_RADIUS))193
.object_fit(ObjectFit::Cover),197
.object_fit(ObjectFit::Cover),@@ -463,6 +463,7 @@ impl FunPicker {
463
463
.hover(|tile| tile.opacity(0.85))
464
464
.child(
465
465
img(image_source(&gif.preview_url))
466
.id(("fun-picker-gif-image", index))
466
467
.size_full()
467
468
.object_fit(ObjectFit::Cover),
468
469
)
@@ -463,6 +463,7 @@ impl FunPicker {463
.hover(|tile| tile.opacity(0.85))463
.hover(|tile| tile.opacity(0.85))464
.child(464
.child(465
img(image_source(&gif.preview_url))465
img(image_source(&gif.preview_url))466
.id(("fun-picker-gif-image", index))466
.size_full()467
.size_full()467
.object_fit(ObjectFit::Cover),468
.object_fit(ObjectFit::Cover),468
)469
)@@ -60,6 +60,7 @@ impl RenderOnce for JumboEmoticon {
60
60
} else {
61
61
images.still.clone()
62
62
};
63
let image_id = ElementId::Name(format!("{}-image", self.id).into());
63
64
div()
64
65
.id(self.id)
65
66
.size(px(EMOTICON_SIZE))
@@ -73,7 +74,7 @@ impl RenderOnce for JumboEmoticon {
73
74
});
74
75
}
75
76
})
76
.child(img(ImageSource::Render(image)).size_full())
77
.child(img(ImageSource::Render(image)).id(image_id).size_full())
77
78
.into_any_element()
78
79
}
79
80
}
@@ -60,6 +60,7 @@ impl RenderOnce for JumboEmoticon {60
} else {60
} else {61
images.still.clone()61
images.still.clone()62
};62
};63
let image_id = ElementId::Name(format!("{}-image", self.id).into());63
div()64
div()64
.id(self.id)65
.id(self.id)65
.size(px(EMOTICON_SIZE))66
.size(px(EMOTICON_SIZE))@@ -73,7 +74,7 @@ impl RenderOnce for JumboEmoticon {73
});74
});74
}75
}75
})76
})76
.child(img(ImageSource::Render(image)).size_full())77
.child(img(ImageSource::Render(image)).id(image_id).size_full())77
.into_any_element()78
.into_any_element()78
}79
}79
}80
}