Commit Graph

103 Commits

Author SHA1 Message Date
David Capello
6db36fe30b Add ZoomCommand so zoom keys are configured in gui.xml file 2014-08-13 00:22:29 -03:00
David Capello
414427e879 ExportSpriteSheet: setup text of columns/width/height when the other fields are modified 2014-08-12 08:12:16 -03:00
David Capello
f0fa34cf4a ExportSpriteSheet: fix getting the best fit size for long animations 2014-08-12 08:09:09 -03:00
David Capello
70f4354f88 Fix initial sprite sheet type in Export Sprite Sheet dialog 2014-08-11 11:48:36 -03:00
David Capello
a2ba77fa1d Fix horizontal/vertical export sprite sheet 2014-08-11 11:48:07 -03:00
David Capello
df3c16b802 Add more options to export sprite sheet (e.g. best fit for texture) 2014-08-11 11:33:17 -03:00
David Capello
c936a792ab Add export_sprite_sheet.xml widget 2014-08-11 07:27:10 -03:00
David Capello
a767eb187d Add layer_properties.xml widget 2014-08-11 06:57:22 -03:00
David Capello
d11900cdef Use generated widget app::gen::DuplicateSprite in DuplicateSpriteCommand 2014-08-11 06:55:51 -03:00
David Capello
7550db81ba Fix issue 446 crash calling replace color in a sprite with no layers
- Fix access to a NULL pointer in ReplaceColorFilterWrapper
- Fix typo in NoImageException
- Do not allow to remove all layers in RemoveLayerCommand
2014-08-11 06:54:14 -03:00
David Capello
1c324c9b14 Add experimental option to use native mouse cursors (and some renames of cursor names) 2014-08-10 19:51:14 -03:00
David Capello
f48440fe71 Use the generated app::gen::Options widget for OptionsCommand 2014-08-10 01:12:31 -03:00
David Capello
33706ce6ff Fix issue 408 saving the Import Sprite Sheet window position 2014-08-09 21:54:12 -03:00
David Capello
303595689f Use generated widget app::gen::NewSprite in NewFileCommand 2014-08-09 21:45:07 -03:00
David Capello
2c675bfc4f Fix crash in PreviewCommand
We cannot use the ui::Graphics internal surface directly when we use
raster::convert_image_to_surface() (it expects an Rgba surface).
2014-08-09 21:33:38 -03:00
David Capello
93c6967409 Show mini editor window again after PlayAnimationCommand 2014-08-09 18:37:23 -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
ff493552aa Capture mouse in PreviewCommand 2014-08-09 17:31:22 -03:00
David Capello
1e84c63042 Use ui::Window to show the animation playback instead of a custom event loop 2014-08-09 17:14:56 -03:00
David Capello
7faf8a1bb7 Fix crash in ClearCommand removing empty cels 2014-08-09 11:25:40 -03:00
David Capello
67f9354b3d Update about dialog 2014-08-09 11:05:13 -03:00
David Capello
6ccd95e22d Use a desktop Window in PreviewCommand to avoid a special events loop 2014-08-09 10:37:51 -03:00
David Capello
dfaf097b88 Rename base/compiler_specific.h to base/override.h 2014-08-09 08:08:20 -03:00
David Capello
5b5a2cfd9f Add support to copy and paste layers between different documents 2014-08-08 10:33:45 -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
David Capello
9fd60f1119 Move Timeline logic to drag-and-drop ranges to app::DocumentRange/move_range/copy_range
This fixes issue 433.
2014-08-07 20:19:31 -03:00
David Capello
c104b4812d Add doc::Settings to get the undo limit (or other settings that will be in the logic/doc layer) 2014-07-31 00:19:58 -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
81ffb0c5bd Refactor: Create doc::Context and move some logic from app::Document to doc::Document
The objective of these changes is to create a more testable doc/logic API.

Included changes:
- Added doc::Context, doc::Documents (the old app::Documents),
  and doc::Sprites (and observers for each)
- Added raster::Sprite::createBasicSprite()
- Added doc::ColorMode (equal to raster::PixelFormat)
- Added some methods to doc::Document: context(), sprites(), sprite()
  (to replace app::Document::getSprite()), width/height(), colorMode(),
  name(), and close()
- Moved app::DocumentObserver/Event to doc::DocumentObserver/Event
- Replaced app::ContextObserver with doc::DocumentsObserver and a couple
  of signals.
- Renamed app::Context::getActiveDocument() with
  doc::Context::activeDocument()
- Renamed app::Context::getActiveLocation() with
  app::Context::activeLocation()
- Removed app::ContextObserverList
- Removed app::DocumentId (now we can use doc::ObjectId)
- Removed app::Context::getSettings()
2014-07-29 00:53:24 -03:00
David Capello
a20bb2d4d7 Change Timeline logic to work with LayerIndex instead of inverted UI indexes
This is a work-in-progress, dropRange() must be reimplemented. Now that
the Timeline uses LayerIndex, we could change Timeline::Range to
DocumentRange and create unit tests for the logic side.
2014-07-24 23:50:45 -03:00
David Capello
411ceda0e7 Add options to save GIF files (how to quantize palettes mainly)
* Added "context" parameter to save/load routines so we can test them.
2014-07-19 22:01:39 -03:00
David Capello
4a17ee351c Minor changes in cmd_goto_frame.cpp 2014-07-06 21:48:46 -03:00
David Capello
fa760d8a21 Restore filename if "save as" fails 2014-07-06 21:29:36 -03:00
David Capello
331688bd86 Add "Zoom with Scroll Wheel" option (on/true by default) 2014-06-22 22:35:51 -03:00
David Capello
0c250df97a Separate Options dialog in different sections
* Add ui::Panel widget
2014-06-22 21:56:04 -03:00
David Capello
9ac51fd0be Rename raster::Pen -> raster::Brush 2014-06-14 15:09:43 -03:00
David Capello
3c959233b6 Add link label in Options dialog to locate the configuration file 2014-06-13 23:00:49 -03:00
David Capello
b54ed9cfe7 Minor change in About dialog 2014-06-13 22:56:21 -03:00
David Capello
6924990992 Simplify slot disconnections with the new Connection and ScopedConnection classes 2014-06-12 22:29:19 -03:00
David Capello
47b5a973e9 Fix issue #405 - crash after merge down
We were deleting the destination cel if there weren't a source cel.
2014-06-09 22:07:24 -03:00
David Capello
f91f41a425 NewFile command: Don't change palette in grayscale images 2014-06-01 18:10:52 -03:00
David Capello
76afcfedac Change current palette after undo/redo 2014-06-01 18:10:26 -03:00
David Capello
a15aea5ed7 Add timeline options for onion skin, loop section, and animation direction
- Add red/blue onion skin type
- Add app::calculate_next_frame() function to calculate the next frame
  depending of the timeline configuration (loop range, animation direction)
- Add app::finder() to simplify the access to widgets loaded from xml files
2014-05-17 21:27:44 -03:00
David Capello
3c2e01b5d8 Replace the dummy developer "console" with a WorkspaceView
This is completely experimental stuff. Just added this because the previous
window doesn't make sense.
2014-05-09 01:01:59 -03:00
David Capello
695243006f Don't show onion skin in the mini editor 2014-05-08 08:50:21 -03:00
David Capello
391a5c0bf4 Add command to switch onion skin visibility 2014-05-08 08:47:45 -03:00
David Capello
a6d900fc2c Fix several old issues with indexed images and transparent color
- If we use a RGB color in a background layer (indexed image),
  and the first palette entry (transparent color) matches that RGB color,
  we can use that entry, because this is the background (the transparent
  color isn't transparent at all in the background layer).
- If we use the same RGB color in a transparent color, we've to avoid the
  transparent color, because the user want to paint with that specific
  solid color.
- Palette::findBestfit() receives a mask_index now, so we can find what
  color best matches a specific RGB avoiding that specific mask color,
  or we can use -1 to use any color (e.g. for background layers).
- Added app::ColorTarget() to simplify and fix color_utils::color_for_layer
  and app_get_color_to_clear_layer(), so now we can use the new findBestfit
  to return the transparent color for background layers (if a RGB color
  matches the transparent color RGB values).
- Removed fixup_color_for_layer/background() functions in color_utils
- Fix NewImageFromMask() to use the mask color to clear the image
- Improve the Editor pen preview (cursor.cpp) to draw the bounds of the
  pen when it will paint with the transparent color.
2014-05-08 00:30:36 -03:00
David Capello
5a45d1ec23 Remove the number of colors entry field from "New Sprite" dialog
This field is disabled, and the program isn't ready to support less than
256 colors in Indexed mode, so it's better if we remove this field to avoid
confusion.
2014-05-06 00:08:43 -03:00
David Capello
fa204baf42 Easier way to reference the program website in commands 2014-05-05 21:28:58 -03:00
David Capello
b991f3b42e Rename cmd_change_image_type.cpp to cmd_change_pixel_format.cpp 2014-05-03 16:27:11 -03:00