A slightly breaking change for a minor update, but one that needed to be done. The bucket tool's "similarity" (now renamed to "tolerance") used to work the opposite way from all other software, the maximum value meant exact color match and 0 meant no color match. Now it works the inverse way to make it be consistent with other software, and the range is now 0-255 instead of 0-100. 0 means exact color match, 255 means no color match. And tolerance also now works for the "similar area" mode as well.
1) `Palettes`'s `reindex_colors_on_width_increase()` was not changing the `index` of `PaletteColors`, thus resulting in the opened palette itself and the saved file having different indices, which could've caused conflicts with multiple colors sharing the same index, if the user re-arranged the palette after resizing it.
2) If the width was increased but the height increased, the positions of the colors remained the same, which resulted in the colors being in the columns that were removed, to be removed themselves. Now, the colors are taking advantage of the empty space, in order to remove as less as colors as possible. No colors will be removed if the width times the height is equal to or greater than it was before.
Thanks to https://godotshaders.com/shader/color-manipulator/
The shader has more options than just brightness and contrast though, but I didn't know how else to name the effect. "Adjust Brightness/Contrast" makes it immediately obvious as to what the effect is about.
Closes #1061, fixes issue where when Pixelorama's window loses focus, the dialogs disappeared, but the dialogs can no longer close when pressing outside of them.
Before this commit, when these tools were being used on large areas, the software would start being very slow due to the polyline drawing. Now it simply draws an image.
TODO:
- Optimize the lasso, pixel and polygon select tools
- Mirror the previews of ellipse selection and shape tools, for consistency with the lasso, pixel and polygon select tools
- Perhaps somehow remove Previews.gd since its work is even more limited now.
* splash ambient
* change fill to radial
* make import tag work with frame button
* hide Import tag dialog when clicking outside
* Icon shows the first frame of a tag
* formatting