1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 07:37:44 +00:00

PixelPaint: Use better-fitting image size

This makes the default image fit perfectly into the default viewport,
which means the first fit_image_to_view call will end up with a scale of
exactly 1. This scale level has no visual artifacts, which is the more
intuitive 'default' behavior.

Fixes #10975.
This commit is contained in:
Ben Wiederhake 2021-11-21 15:31:52 +01:00 committed by Andreas Kling
parent 177478dadf
commit afc456edd6
2 changed files with 3 additions and 3 deletions

View file

@ -794,7 +794,7 @@ void MainWidget::open_image_fd(int fd, String const& path)
void MainWidget::create_default_image()
{
auto image = Image::try_create_with_size({ 480, 360 }).release_value_but_fixme_should_propagate_errors();
auto image = Image::try_create_with_size({ 510, 356 }).release_value_but_fixme_should_propagate_errors();
auto bg_layer = Layer::try_create_with_size(*image, image->size(), "Background").release_value_but_fixme_should_propagate_errors();
image->add_layer(*bg_layer);