Commit Graph

22 Commits

Author SHA1 Message Date
David Capello
48fc0cbcb4 Don't allow shift pixels on locked layer
Discussion: https://community.aseprite.org/t/750
2017-12-01 17:18:23 -03:00
David Capello
e0a60b6748 Generate the list of command IDs from en.ini file 2017-12-01 15:10:21 -03:00
David Capello
ccee49c02b Move command friendly names to the strings file
Related to #124
2017-11-30 23:41:45 -03:00
David Capello
5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello
591b3b19ac Add MoveMaskCommand::getDelta member function 2016-05-18 12:03:28 -03:00
David Capello
34ebf07118 Fix warning ptr <-> bool conversion in MoveMaskCommand::onEnabled() 2016-05-06 16:52:56 -03:00
David Capello
ccabc9ad01 Fix arrow keys to move selection (fix #1120) 2016-05-05 23:20:34 -03:00
David Capello
1aaeacc460 Refactor several "getNoun()" getters to "noun()"
This is a work-in-progress to create a consistent API and finally
separate the whole Aseprite base/gfx/ui libs into a reusable C++ library.

Classes:
app::IFileItem, app::AppMenuItem, app::skin::SkinPart,
gfx::Rect, gfx::Border, she::FileDialog,
ui::IButtonIcon, ui::Graphics, ui::Overlay, ui::Widget,
ui::ScrollableViewDelegate, and UI events
2015-12-04 14:39:04 -03:00
David Capello
462f1f395e Add support to rotate the selection/moving pixels (fix #161) 2015-08-13 21:47:30 -03:00
David Capello
8fd756c32a Add Edit > Shift commands (fix #681) 2015-07-06 18:48:55 -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
0cb4b2234d Always load params when a command is executed
This is to avoid leaving commands with old params (a problem with
keyboard shortcuts). To make sure, we've changed arguments from Params*
to Params&, so we always have params to load.

Also, in this change we introduce a new way to give parameters to executed
commands from menu items using AppMenuItem::setContextParams(). Before
showing a popup, we can call setContextParams() to give extra params to
the command (e.g. the specific FrameTag to remove or change properties).
In this way "contextparams" attribute for <item> in gui.xml is not
available anymore.
2015-03-11 15:40:22 -03:00
David Capello
69ac11eea2 Remove IDocumentSettings and DocumentSettingsObserver
Document user options are completely replaced with DocumentPreferences.
2015-02-15 09:48:38 -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
4fc28d5639 Add zoom out (related to issue #33)
Before the zoom was handle as a bits shift (scaled = value << zoom),
now the zoom is a fraction (scaled = value * zoom.num / zoom.den).

Changes:
* Add Zoom class to apply/remove zoom factor
* Split merge_zoomed_image template function into
  merge_zoomed_image_scale_down and merge_zoomed_image_scale_up
  to handle the special case where zoom.num/zoom.den < 1.0
2014-11-24 17:18:30 -03:00
David Capello
39b8e034b5 Merge branch '1.0'
Conflicts:
	.gitmodules
	CMakeLists.txt
	src/CMakeLists.txt
	src/app/app.h
	src/app/app_menus.cpp
	src/app/commands/cmd_move_mask.cpp
	src/app/commands/cmd_rotate.cpp
	src/app/modules/gui.cpp
	src/doc/resize_image_tests.cpp
	src/ui/accelerator.cpp
	third_party/CMakeLists.txt
2014-10-30 01:06:27 -03:00
David Capello
f939ef5f02 Add keyboard shortcuts customization (close #253)
Changes:
* Add KeyboardShortcutsCommand and window
* Add SelectAccelerator window
* Replace modules/gui.cpp functions with app::KeyboardShortcuts and
  app::Key with the logic to load/save/handle keyboard shortcuts
* Change ui::Accelerator concept: now it represent just one keyboard
  shortcut, not a set of shortcuts
* Remove ui::Accelerator from ui::MenuItem, now the key is associated
  in app::AppMenuItem and it's a app::Key
* Add Command::onGetFriendlyName() to get a user friendly name of the
  command depending on its parameters
2014-10-29 11:58:03 -03:00
David Capello
63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello
16ba5920a1 Change "outline" to "boundaries" in MoveMaskCommand 2014-08-24 23:33:13 -03:00
David Capello
5075c1f86f Remove unused variables/code 2014-08-17 20:37:12 -03:00
David Capello
626ec1d2ba Add MoveTaskCommand: now you can move the selection with Shift+arrow keys 2014-08-08 01:00:02 -03:00