Commit Graph

41 Commits

Author SHA1 Message Date
David Capello c60e0b915c Merge branch 'master' into beta 2016-10-27 13:00:57 -03:00
Keith Whitney cf6cd534ef Allow Esc key to close Cel Properties window
Resolves aseprite/aseprite#964.
2016-10-24 23:31:21 -04:00
David Capello 1404b0ce7d Merge branch 'master' into beta 2016-09-16 16:02:26 -03:00
David Capello 6377b550e3 Replace base::Signal/Observable* with obs::signal/observable
We can use the obs library directly for signal/slots and observable
objects.
2016-09-13 15:02:00 -03:00
David Capello 20b726f73b Merge branch 'master' into beta 2016-08-31 19:53:52 -03:00
David Capello 5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello 94b508989e Fix changing opacity of a cel's range
We have to change the range in Timeline before generating a
onActiveSiteChange() so the cel's properties dialog knows the new range
to be used to change the opacity.
2016-08-25 20:21:38 -03:00
David Capello f2f1c1008b Add support to move/copy non-adjacent layers/frames
Changes:
* With this patch we finally removed the LayerIndex class and member
  functions to access layers by index (like Sprite::firstLayer/layerLayer
  /layer/indexToLayer/layerToIndex() etc.). As layer groups can be
  expanded/collapsed, it doesn't make sense to use layer index to
  access layers directly from sprite.
* Now we use a layer_t (int) to access a list of browsable layers each
  time we want to iterate visible layers in the timeline.
* Replaced CelsRange() and Sprite::uniqueCels() param with
  SelectedFrames to iterate non-adjacent cels.
* Updated clipboard operations (copy/paste) in timeline to support
  layer groups.
* Updated Timeline control to support selecting multiple layer/frame
  ranges with Ctrl+ or Alt+click (fix #1157)
* Added more test units for DocumentRange operations (mainly for
  non-adjacent ranges).
2016-08-25 12:31:00 -03:00
David Capello 5f90ef7c9b Add properties in App to access directly to timeline/contextBar/workspace 2016-04-22 13:19:06 -03:00
David Capello bb41bd32b4 Don't change cel user data when cel opacity is the only modified field 2016-02-01 18:09:02 -03:00
David Capello be57d0332f Fix setting opacity or user data of linked cels when the first cel isn't included in the active range 2016-02-01 18:05:40 -03:00
David Capello 2f791b5ad1 Fix several problems with timeline and cel opacity slider
* Enable cel opacity slider when any transparent cel is selected
  (it doesn't matter if there are cels from a background layer selected
   too, the slider must be enabled for the transparent ones)
* Enable editing user data when we have a range of cels selected
  (it doesn't matter if the active cel is nullptr, we've to enable
   editing user data if there is any selected cel in the timeline range)
2016-02-01 10:52:05 -03:00
David Capello db13644e0a Fix problem setting cel color in all cels when a range is selected in Timeline 2015-12-23 14:19:09 -03:00
David Capello 4c58441823 Redraw Timeline when layer/cel user color is changed 2015-12-22 13:18:08 -03:00
David Capello f27836744f Show correct user data after undo/redo and commit change immediately 2015-12-11 13:58:32 -03:00
David Capello 08bef859e3 Add user data field on layers and cels 2015-12-10 18:34:25 -03:00
David Capello e944ce0052 Move Bind, Connection, Signal, Slot, etc. to base namespace 2015-12-04 15:17:42 -03:00
David Capello e15b9aca21 Remove some #includes directives 2015-09-22 17:32:42 -03:00
David Capello e7e9f1d482 Change name of generated files from "generated_file.h" to "file.xml.h" 2015-09-22 16:33:49 -03:00
David Capello 5dfe7b64ae Enter key closes Cel or Layer properties if children have the focus 2015-08-21 14:53:31 -03:00
David Capello f8254b01aa Add support to modify several cels' opacity using CelProperties dialog 2015-08-21 11:01:49 -03:00
David Capello d3232c82ff Restore layer/cel properties before the transaction just in case we caught an exception 2015-08-21 09:38:18 -03:00
David Capello dc9ee103f0 Make CelProperties dialog non-modal 2015-08-21 08:35:29 -03:00
David Capello bb9be0afb8 Use the generate widget in CelPropertiesCommand 2015-08-20 23:42:05 -03:00
David Capello 5f159f14a7 Remove mini style from opacity slider in Cel Properties dialog 2015-08-11 13:57:59 -03:00
David Capello f01b816fb5 Remove JI_ prefix from ui/base.h constants 2015-06-23 14:00:00 -03:00
David Capello 2c6067f7e4 Update license of app/ module to GPLv2 2015-02-12 12:16:25 -03:00
David Capello e55865843e Replace undo impl: replace undoers with cmds
Undoers were little objects to swap/revert an action. They didn't
execute the action itself, they just revert its previous state. Now
undoers were replaced with cmds: A cmd is an object that
executes/undoes/redoes just one action.

Changes:
* Remove old undo library and app/objects_container_impl.cpp
  (now we use the doc::ObjectId directly to store undo info)
* Remove all Undoers from app/undoers/
* Replace DocumentApi impl with little Cmds in app/cmd/, these
  cmds handle execute/undo/redo of each action at the logic layer
* Remove doc::Dirty object
* Remove doc::Settings: all undo configuration is in the app side
* Move undo options from app:ISettings to app::Preferences
* Rename UndoTransaction to Transaction
* Create a CmdSequence to store a sequence of Cmds (as now the new
  undo library doesn't support open/close groups)
* Add doc::get<T>(ObjectId) function to get any kind of object
  from the doc library by its ID
* Add Cel::document() and Sprite::document() members
* Add Sprite::cels(frame_t) to get all cels in the given frame
* Add Layer::displaceFrames() member function
* Move the "allow non-linear history" flag from undo2::UndoHistory
  to app::DocumentUndo
2015-01-18 22:05:33 -03:00
David Capello f1f24cbcdd Replace doc::Stock with doc::ImageRef shared pointer
Changes:
* Add doc::ImageRef to count references to the same image between Cels
  (at this moment we cannot generate linked cels anyway)
* Remove doc:Stock class and doc::Sprite::m_stock member variable
* Remove app::undoers::Add/RemoveImage
* Add doc::SubObjectsIO and app::undoers::ObjectIO to
  replace doc::LayerSubObjectsSerializer
2015-01-04 10:58:14 -03:00
David Capello cc889f2b2f Minor refactor to doc::Layer flags 2014-11-16 23:03:30 -03:00
David Capello 63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello 5d3d96d2d9 Minor changes: remove unnecessary dependencies with allegro.h 2014-09-21 11:59:39 -03:00
David Capello 5075c1f86f Remove unused variables/code 2014-08-17 20:37:12 -03:00
David Capello 6824570c4b Remove base/override.h (use override keyword directly) 2014-08-14 23:07:47 -03:00
David Capello a5d6af7d87 Fix issue 426: The user should not be able to change cel opacity in Indexed images 2014-08-09 18:04:53 -03:00
David Capello 91b0c2d071 Refactor: Remove "get" part for member functions that act like a simple getter
Additional change:
- Added Cel::image() to get the related image of the cel directly
2014-07-30 01:28:15 -03:00
David Capello aaa662cf23 Implement CelProperties commands using DocumentApi::setCelOpacity 2014-05-02 12:10:29 -03:00
David Capello 44d3e228fd Add missing OVERRIDE modifier to Command::clone() overrides
It fixes some invalid clone() overrides without const modifier.
2014-03-29 17:08:40 -03:00
David Capello e5ba8e0922 Encapsulate Image implementation (private members, accessors, iterators, etc.)
- Rename _rgba/_graya to raster::rgba()/graya()
- Add raster::color_t type (alias for uint32_t)
- Rename raster::GfxObj to Object. And GfxObj::getType() to Object::type()
- Move conversion from raster::Image/Palette to Allegro BITMAP/RGB
  to raster/conversion_alleg.h file
- Add raster/color_scales.h
- Rename image_* functions to raster/primitives.h
- Reimplement ink processing with templates instead of macros
2013-11-09 19:59:05 -03:00
David Capello cde54f3682 Change BSD license to MIT in sublibraries and fix headers 2013-08-08 21:01:20 -03:00
David Capello c88f9b172b Refactor: Move app files to src/app subdirectory inside app namespace
- Add HAVE_CONFIG_H wrapper to #include "config.h"
- Removed widgets namespace (it's in app now)
- Move some functions from src/file/file.h to src/base/cfile.h
- Move Vector2d to base library
- Rename MenuItem2 to AppMenuItem
2013-08-05 21:20:19 -03:00