34 Commits

Author SHA1 Message Date
David Capello
ae904428fa Merge branch 'main' into beta 2021-04-08 16:15:02 -03:00
David Capello
a122f1ceba Reset tool preferences just once when running from CLI 2021-04-07 12:58:03 -03:00
Gaspar Capello
886fdf8b3f Add OctreeMap as an alternative RgbMap implementation to RgbMapRGB53A
There is a new experimental option to switch between both RgbMap
implementations.
2020-04-10 15:47:24 -03:00
David Capello
9609e541e5 Fix some issue with saved defaults (selection mode and snap to grid)
These two preferences are confusing when saved with non-default
values. For example, snap to grid should be almost always turned off
and turned on only when the user do it explicitly.

The other one is the subtraction selection mode, if we save that as a
default mode, users will find that the selection tool stop working
when the program is re-started.

Both of these issues generated user support over all these years.
2020-03-30 10:39:07 -03:00
David Capello
8139b8a1d4 Move Preferences instance to app::Context
With this change we fix some tests when !ENABLE_UI and we start using
less Preferences::instance() (maybe in the future we could exclusively
access the preferences from the new Context::preferences() function).
2019-12-11 12:27:56 -03:00
David Capello
6cab7b208c Fix using default preferences on new documents (fix #2198)
Fixed regression introduced in 002abc92452d89dabe601af0bfedf81e3e2ab0fd.
Bug reports:
* https://github.com/aseprite/aseprite/issues/2198
* https://steamcommunity.com/app/431730/discussions/2/1657817111845334892/
* https://community.aseprite.org/t/grid-size-for-new-documents-not-applied/4305

Added new ASEPRITE_USER_FOLDER environment variable to test
preferences from a clean folder.
2019-12-02 19:13:27 -03:00
David Capello
002abc9245 Don't set preferences with latest defaults if there is an existent .ini file for the sprite
Might fix: https://community.aseprite.org/t/grid-for-new-documents/3303
2019-10-29 11:19:53 -03:00
David Capello
364b0d2088 Avoid resetting the showMenuBar setting to false by mistake
Change the way we calculate the first-execution of the
program (without depending on the UUID of the updater, e.g. because
the server didn't return an UUID, etc.).
2019-06-05 10:44:00 -03:00
David Capello
a6041272c9 Minor assert() in Preferences::save() 2019-05-27 23:53:57 -03:00
David Capello
232c551f1a Don't document preferences after loading it 2019-05-27 23:53:57 -03:00
David Capello
0264964c4e lua: Add app.preferences object 2019-04-24 21:14:20 -03:00
David Capello
5cf762c9cf lua: Fix app.useTool() tests when we run in batch/non-UI mode
* Tools must use the default configuration when we run in -batch mode
* Fixed app_get_current_pixel_format() when ENABLE_UI is disabled so
  the color= parameter of app.useTool{} depends on the activeSprite
  color mode
2019-04-24 18:31:43 -03:00
David Capello
f3bb1ecdf1 Fix regression introduced in ed0f4c3023d8a8b78d04b00177e25a9f5840077d 2019-04-01 19:57:53 -03:00
David Capello
673e1955fa Don't use Preferences in background threads 2019-04-01 13:19:42 -03:00
David Capello
d80d79d160 Fix file_tests.cpp segfault 2018-10-25 12:27:06 -03:00
David Capello
5cb2d984f0 Rename she -> os 2018-08-09 12:58:43 -03:00
David Capello
9c79ea2b77 Rename app::Document -> Doc 2018-07-07 11:54:44 -03:00
David Capello
457a9999b5 Move doc::Context to app::Context (#378)
We've moved everything related to Context/active site/observable
documents from "doc" namespace to "app" namespace.
2018-07-07 02:47:42 -03:00
David Capello
b5dc3d263e Add options to suppress specific warnings (fix #917) 2018-02-07 14:35:12 -03:00
David Capello
dfa441d2a0 Add option to show/hide Aseprite menu bar
The original Aseprite menu bar will be hidden by default for new users
on macOS.
2017-09-01 17:18:53 -03:00
David Capello
fbb0cdcbe2 Fix resetting default grid preferences (fix #1380) 2017-01-30 19:07:11 -03:00
David Capello
5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello
9c1a8762ab Add option to export sprite sheets in memory only (without a file, fix #865)
We have converted the label "Save As" into a checkbox in the Export
Sprite Sheet dialog.
2015-11-20 14:49:40 -03:00
David Capello
a3deb2063e Add MovingSymmetryState to modify symmetry axis position 2015-10-28 20:00:18 -03:00
David Capello
dc33cf754b Copy background & grid preferences to the exported sprite sheet 2015-08-20 23:06:30 -03:00
David Capello
8a3434586e Set default brush size for eraser/blur/jumble to 8px 2015-08-11 12:41:56 -03:00
David Capello
f6be0c3be6 Replace ISettings with Preferences
Changes:
* Move FreehandAlgorithm/InkType/RotationAlgorithm/SelectionMode to
  app::tools namespace
* Removed ISettings, IToolSettings, IBrushSettings, ISelectionSettings,
  and IColorSwatchesStore (and implementations from UISettingsImpl)
* Added app::tools::PreferenceGlue to do some adjustments that
  UIToolSettingsImpl was doing
* Remove signals from App related to brush size/angle changes, and current
  tool change (there events can be observed directly from Preferences)
* Remove ColorBar::FgColor/BgColor, these options can be observed from
  Preferences::colorBar.fg/bgColor
2015-05-18 16:53:25 -03:00
David Capello
50e9ed6326 Unify "Export Sprite Sheet" command with DocumentExporter 2015-03-17 16:43:51 -03:00
David Capello
4588579e25 Redraw editor when onionskin preferences are changed
We have added a Before/AfterChange signals to preference Sections.
2015-03-10 19:05:20 -03:00
David Capello
869b6606b2 New documents get the global grid settings 2015-02-14 23:41:10 -03:00
David Capello
2e90eb8d4c Load document and tool preferences (fix #596) 2015-02-14 23:20:45 -03:00
David Capello
2c6067f7e4 Update license of app/ module to GPLv2 2015-02-12 12:16:25 -03:00
David Capello
da1358c5dc Unify all render code in one library
Changes:
* Create render library (move util/render.cpp to render/render.cpp)
* Move app::Zoom class to render::Zoom
* Remove doc::Image::merge() member function
* Add gfx::Clip helper class (to clip dst/src rectangles before a blit)
* Move doc::composite_image() to render::composite_image()
* Remove doc::Sprite::render()
* Replace Sprite::getPixel() with render::get_sprite_pixel()
* Remove doc::layer_render() function
* Convert DitheringMethod to a enum class
* Add AppRender to configure a render::Render with the app configuration
* Move checked background preferences as document-specific configuration
* Add doc::Sprite::layer() and palette() member functions
* Add doc::Layer::cel() member function
* Add doc::Palette::entry() member function()
* Add doc::frame_t type
* Move create_palette_from_rgb/convert_pixel_format to render library
* ExportSpriteSheet doesn't need a temporary image now that we can specify
  the source rectangle in the render routine
2014-12-28 11:06:11 -03:00
David Capello
73658399cc Add setting/preference classes/enums generator
Changes:
* Add a class (Option<T>) to get/set/listen changes to one specific
  preference option
* Add data/pref.xml with the metadata to generate types/classes (not it's
  quite easy to add new preferences)
* Modify the generator to support generation of .h and .cpp files of
  preference types
* Add code to migrate old options to new ones (and functions to delete
  old values)
* Only a couple of options were migrated at the moment, it is a WIP, in the
  future we should completely remove ISettings and direct calls
  to set/get_config_*
2014-12-14 20:19:31 -03:00