mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +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:
parent
177478dadf
commit
afc456edd6
2 changed files with 3 additions and 3 deletions
|
@ -72,8 +72,8 @@ CreateNewImageDialog::CreateNewImageDialog(GUI::Window* parent_window)
|
||||||
width_spinbox.set_range(1, 16384);
|
width_spinbox.set_range(1, 16384);
|
||||||
height_spinbox.set_range(1, 16384);
|
height_spinbox.set_range(1, 16384);
|
||||||
|
|
||||||
width_spinbox.set_value(480);
|
width_spinbox.set_value(510);
|
||||||
height_spinbox.set_value(360);
|
height_spinbox.set_value(356);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -794,7 +794,7 @@ void MainWidget::open_image_fd(int fd, String const& path)
|
||||||
|
|
||||||
void MainWidget::create_default_image()
|
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();
|
auto bg_layer = Layer::try_create_with_size(*image, image->size(), "Background").release_value_but_fixme_should_propagate_errors();
|
||||||
image->add_layer(*bg_layer);
|
image->add_layer(*bg_layer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue