Now the default palette is saved in the user configuration
directory, so we can set any palette as the default (it doesn't
matter if it's related or not to a file, it will be copied into
the user directory anyway).
Now the ContextBar contains a set of brushes. The ChangeBrushCommand
supports a new "slot" parameter and "change" = "custom" to select a
specific custom brush from the ContextBar. Alt+1, Alt+2, etc. are mapped
to this ChangeBrushCommand (see changes in gui.xml).
Also, as the ButtonSet that represent different brushes in the ContextBar
uses icons generated from the brush, we don't need the skin parts that
represent each brush type (we can generate those icons from some standard
brushes). Those skin parts were removed.
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.
Add a new contextparams attribute to menu items in gui.xml that are feed
by the UI with params (e.g. the FrameTag popup needs to know what exact
tag we should edit, and it's a command Param provided by the Timeline).
Renamed Preview to FullscreenPreview to avoid confusion.
As an extra "to do", we need to add command aliases, so Preview matches
FullscreenPreview (mainly to keep user defined keyboard shortcuts).
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
Here we avoid copying and clearing pixels that will not be used
in the whole tool loop process.
Changes:
* Add several member functions in ToolLoop to validate/invalidate regions
of source/destination images so we know what regions are safe to use
by inks and can be shown in the editor
* Add new DocumentObserver::onExposeSpritePixels() member to validate
pixels that will be displayed in the editor
* Add Ink::needs/createSpecialSourceArea() member functions to validate
extra areas for inks like blur or jumble
* Add undoers::ModifiedRegion to save the undo information about the
modified region
* Add ShowHideDrawingCursor class
* Change "blur" tool policy from overlap to accumulate
(This is a real fix for issue #239)
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
- Add doc::ExportData with information about the last export operation.
- Add RepeatLastExport command.
- Add SaveFileBaseCommand as base Command class, to accept "filename"
param.
- Add parameters to ExportSpriteSheet so we can call it without UI
from "repeat last export".
With this patch we replace the "unique/odd" behavior of Aseprite where
you add selection regions with left-click and remove with right-click.
Now by default you replace the selection with left-click (as in regular
gfx programs). Also you can change the selection tool behavior with
buttons/icons at the context bar (to select between replace/add/subtract).
Now we have one editor for each Document we want to edit. Before we were
creating one editor and switching the document on it, but now we have
several Editors (one for each opened Document). This simplifies the
Document implementation, because it doesn't need to know temporal
Editor information (like "preferred editor settings").
- Removed all code from modules/editors.cpp (legacy from C code).
- Removed PreferredEditorSettings class and
Document::getPreferredEditorSettings().
- Added Workspace/WorkspaceView classes.
- Added DocumentView (a DocumentObserver).
- Added MiniEditorWindow class.
- Removed SelectFileCommand & CloseEditorCommand.
- Added TabView interface instead of using a raw void* in
Tabs/TabsDelegate classes.
- Modified editors_draw_sprite() calls to Document::notifySpritePixelsModified
notifications.
- The "current_editor" global variable wasn't removed because it's
used in several places yet, but it will be removed in the near future.
(Also this variable now can be NULL when we don't have an opened
document.)
Several refactoring tasks where made:
- Removed the old Widget::id field (JID).
- Renamed Widget::get/setName to get/setId.
- Moved load_widget_from_xmlfile() to app::load_widget and WidgetLoader
class.
- Removed jhook structure & jwidget_add_hook function. Hooks were replaced
subclassing widgets.
- Added InitThemeEvent class and Widget::onInitTheme member function.