Adjust thumbnail size, allow zoom in preview
This commit is contained in:
parent
9905af8f6f
commit
752e29e281
1 changed files with 4 additions and 2 deletions
|
|
@ -461,7 +461,9 @@ impl Item {
|
||||||
column = column.push(widget::row::with_children(vec![
|
column = column.push(widget::row::with_children(vec![
|
||||||
widget::horizontal_space(Length::Fill).into(),
|
widget::horizontal_space(Length::Fill).into(),
|
||||||
if is_image {
|
if is_image {
|
||||||
widget::image::Image::new(&self.path).into()
|
widget::image::viewer(widget::image::Handle::from_path(&self.path))
|
||||||
|
.min_scale(1.0)
|
||||||
|
.into()
|
||||||
} else {
|
} else {
|
||||||
widget::icon::icon(self.icon_handle_grid.clone())
|
widget::icon::icon(self.icon_handle_grid.clone())
|
||||||
.size(sizes.grid())
|
.size(sizes.grid())
|
||||||
|
|
@ -1125,7 +1127,7 @@ impl Tab {
|
||||||
Ok(reader) => match reader.decode() {
|
Ok(reader) => match reader.decode() {
|
||||||
Ok(image) => {
|
Ok(image) => {
|
||||||
//TODO: configurable thumbnail size
|
//TODO: configurable thumbnail size
|
||||||
let thumbnail = image.thumbnail(256, 256);
|
let thumbnail = image.thumbnail(64, 64);
|
||||||
Ok(thumbnail.to_rgba8())
|
Ok(thumbnail.to_rgba8())
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue