Pinta icon indicating copy to clipboard operation
Pinta copied to clipboard

Custom image size on startup

Open yioannides opened this issue 8 months ago • 6 comments

Description Congratulations on your v3.0 release! I was wondering if it would be possible to add a default image size parameter in settings.xml, Iike we already have for new-image-width and new-image-height.

I see there's a line that hardcodes the default image values: https://github.com/PintaProject/Pinta/blob/42cb68f4f89ae8290f345d4705294cd6427ee06e/Pinta/Main.cs#L137

Thank you!

yioannides avatar Apr 12 '25 17:04 yioannides

Some previous discussions :#994, #1204

I think there would need to be some UI support for this, e.g. maybe an option in the New Image dialog to save the size as the default

cameronwhite avatar Apr 13 '25 04:04 cameronwhite

In favor of keeping Pinta in its simplest form, I would personally suggest for a Save as Default menu entry where clicking it for the first time would just input a new parameter in settings.xml, for example <setting name="default-image-width" type="System.Int32">1000</setting>(and the same for height, respectively) and every other click after that would first search inside of settings.xml for existing parameters and only then prompt the user with a single dialog box asking "Overwrite existing settings?", with Confirm or Cancel options.

I believe even Inkscape's implementation of naming your default session is a bit overkill (see screenshot below) for this case scenario; realistically speaking, unless the developer is intending to eventually expand on named presets / templates, a user only needs one default configuration, which settings.xml is perfectly suited for providing.

Image

Otherwise, your suggestion of having a "Save as default" checkmark on the New Image dialog is also perfectly fine!

yioannides avatar Apr 13 '25 07:04 yioannides

I think I'd lean toward keeping it in the New Image dialog rather than as a separate menu entry, since you need to use the New Image dialog anyways to create the image size you want. It could be a button to immediately save the preference rather than a checkbox, though. That could also tie into the suggestions from the linked discussions about saving new preset sizes

cameronwhite avatar Apr 13 '25 20:04 cameronwhite

Yes I think your suggestion is far more elegant and straightforward, though as a reminder, Pinta already remembers most of last session's settings in settings.xml by default, so if that's not intended, a Save as Default menu entry could be serviceable for saving everything at once, like a user's preferred tool order (#1219 ?), settings, image size etc

yioannides avatar Apr 15 '25 13:04 yioannides

Yeah, auto-saving the preferences is generally the expected workflow. I think the reason I was leaning towards an explicit button here is that users might not make the connection between the default blank image when opening Pinta and the New Image dialog, but I could be convinced either way

cameronwhite avatar Apr 15 '25 21:04 cameronwhite

If Pinta auto-saves preferences by default, but need to make an explicit notice of making a new image default, then yes it only makes sense to have it inside of the New Image dialog in the form of a button (in some cases, alongside a Revert to Original button)

Rough mockup:

Image

yioannides avatar Apr 16 '25 07:04 yioannides