feat: default to FilterMethod::Nearest on small image
helps make pixelart sharp without the need to change it yourself
This commit is contained in:
parent
fc92ff60e0
commit
c96a1cbdd1
1 changed files with 3 additions and 0 deletions
|
|
@ -164,6 +164,9 @@ impl State {
|
|||
image.width(),
|
||||
image.height(),
|
||||
));
|
||||
if image.dimensions() < (100, 100) {
|
||||
self.image_filter = widget::image::FilterMethod::Nearest;
|
||||
}
|
||||
self.image = Some(image);
|
||||
self.allocate_image()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue