Commit Graph

3297 Commits

Author SHA1 Message Date
David Capello
447bf3ef0b Add needed #include to use std::string type 2015-05-11 10:41:25 -03:00
David Capello
e05a635533 Fix usage of ImageRef shared pointer in app/util/clipboard.cpp 2015-05-11 10:41:11 -03:00
David Capello
063f1d173c Fix TipWindow() ctor signature 2015-05-11 10:40:37 -03:00
David Capello
cff735a7c8 Remove unused variables 2015-05-11 10:40:23 -03:00
David Capello
1583cd82bd Avoid using ESC key to close non-foreground windows 2015-05-11 09:53:45 -03:00
David Capello
300a5cc1cb Fix palette editor for one entry (non-selected range)
This fix the most common behavior where we are capable of use
eyedropper to pick just one color, and modify it with the editor.
2015-05-11 09:51:10 -03:00
David Capello
442d8c624a Fix triggering Editor's onCut() without mask when ColorBar's onCanCut() enables it
Asking for onCanCut/Copy/Paste/Clear just before onCut/Copy/Paste/Clear
in the same InputChainElement we ensure that the command for that specific
element can be used (and we aren't mixing onCans result of one input chain
element with the execution of the first input chain element command).
2015-05-11 09:37:39 -03:00
David Capello
525e473fb5 Add relative mode in Palette Editor 2015-05-10 22:53:36 -03:00
David Capello
9fc7b993d4 Add ability to cut colors in the ColorBar 2015-05-10 21:36:46 -03:00
David Capello
cd1f764d85 Rename EditorState::onBefore/AfterChangeState to onLeave/EnterState()
This is to avoid confusion about the meaning of these callbacks.
2015-05-10 19:32:42 -03:00
David Capello
38526f3b9e Rename PaletteView::clearSelection() -> deselect() 2015-05-10 19:23:30 -03:00
David Capello
b5b59dece4 Add ability to clear colors from ColorBar 2015-05-10 19:19:48 -03:00
David Capello
c1324d196e Fix ColorBar::onCanPaste() to return true when we can still paste colors 2015-05-09 20:27:40 -03:00
David Capello
f395a0c768 Disable data recovery on trial mode 2015-05-09 20:18:10 -03:00
David Capello
2bbaa45844 Unify Cut/Copy/Paste/Clear handling with InputChain class 2015-05-09 19:55:33 -03:00
David Capello
e60236640a Destroy ColorMap remap information when Undo/Redo is executed 2015-05-09 16:18:27 -03:00
David Capello
11d86bb7c5 Add ability to copy colors using Ctrl + drag & drop 2015-05-09 15:57:46 -03:00
David Capello
cea0970d9d Fix several bugs with tooltip arrows/location
The tooltip arrow is now aligned to the target. And the tooltip is
relocated to the other side if it intersects its target bounds.
2015-05-09 13:20:57 -03:00
David Capello
06d1929729 Remove background color as an option in "New File" 2015-05-09 12:46:07 -03:00
David Capello
352eff2fd6 Add tooltips to ColorBar buttons 2015-05-09 12:30:05 -03:00
David Capello
62a3594598 Add ability to copy & paste colors with Ctrl+C and Ctrl+V
This commit includes the new doc::PalettePicks class. It's a helper
class to identify which entries are selected in the ColorBar.

We've removed the Copy/Paste buttons from the Palette Editor window.
2015-05-09 12:20:58 -03:00
David Capello
feb592db73 Remove Ramp and Quantize buttons from PaletteEntryEditor
These actions are now in the options above the ColorBar.
2015-05-08 17:37:41 -03:00
David Capello
1ef1f9e3e7 Add option for color quantization in the ColorBar options popup 2015-05-08 17:34:51 -03:00
David Capello
2995190d00 Fix crash making palette entries too small using scroll wheel 2015-05-08 17:00:44 -03:00
David Capello
ca1ebf02b5 Add option to create color gradients in the ColorBar 2015-05-08 16:55:08 -03:00
David Capello
5f46ffc5e0 Change position of "Remap" button so it's more noticeable 2015-05-08 16:17:42 -03:00
David Capello
d31f83e098 Add option to load/save default palette preset (fix #626)
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).
2015-05-08 16:08:55 -03:00
David Capello
d3dbc11451 Add options to change palette entry size 2015-05-08 14:59:52 -03:00
David Capello
5437ccd2a2 Move palette menu to color bar options button 2015-05-08 14:36:54 -03:00
David Capello
6a9382a975 Add option to reverse colors 2015-05-08 14:28:27 -03:00
David Capello
575e94e559 Add popup menu to sort palette colors 2015-05-08 13:03:06 -03:00
David Capello
dab8c96fa8 Fix bug getting ANSI clipboard text on Windows
Sometimes the clipboard content is in CF_TEXT format and there is
no implicit CF_UNICODETEXT conversion.
2015-05-07 22:56:02 -03:00
David Capello
bea61fab88 subpixelPos can be in [-1,0] range when we zoom outside sprite bounds 2015-05-07 21:50:15 -03:00
David Capello
146460ea1b Merge branch 'master' of git@github.com:aseprite/aseprite.git 2015-05-07 19:19:46 -03:00
David Capello
804330788b Add right-click popup menu in play buttons to change animation speed (fix #595) 2015-05-07 19:08:24 -03:00
David Capello
0bd85f93a5 Merge pull request #666 from agateau/build-fixes
Fix build with g++ 4.9
2015-05-07 18:56:16 -03:00
Aurélien Gâteau
2855180dd9 Fix build with g++ 4.9 2015-05-07 22:59:10 +02:00
David Capello
ee3d4ca63c Improve zoom movement using a "subpixel" factor
This factor indicates exactly where the mouse is inside the zoomed pixel,
and uses it to locate the new zoom with the same factor (if it's possible).
2015-05-07 17:23:44 -03:00
David Capello
11929dfd60 Fix the mouse position in scroll wheel events from she layer 2015-05-07 17:21:37 -03:00
David Capello
b74727489d Fix limiting splitter position when it's hidden (with no bounds) 2015-05-07 15:59:29 -03:00
David Capello
97609b6504 Add option to change the zoom behavior with keys 2015-05-07 15:56:38 -03:00
David Capello
b2955d58ad Add option to change the zoom behavior with scroll wheel 2015-05-07 15:52:26 -03:00
David Capello
3d29adcbdf Fix zoom behavior when the zoom is changed from the center 2015-05-07 15:13:26 -03:00
David Capello
bfaf8a5921 Add ability to change the Preview zoom using 1...6 keys above the Preview 2015-05-07 14:43:33 -03:00
David Capello
35c8cc893b Add some help text in ContextBar when SelectBoxState is running 2015-05-07 13:11:44 -03:00
David Capello
18b067ee77 Add ContextBar::updateForCurrentTool() which is a common thing to do 2015-05-07 12:32:08 -03:00
David Capello
e398a1f21f Allow any size of boundaries for brushes
As now the eraser must show the boundaries of custom brushes, the fixed
maximum limit we were using (MAX_SAVED) for boundaries is not enough.
So now we use a std::vector for saved pixels.
2015-05-07 12:18:58 -03:00
David Capello
c90677333b Show current brush bounds for eraser tool (even for custom brushes) 2015-05-07 12:10:04 -03:00
David Capello
7b1b667a8a Fix problem resizing splitters with pixel-based position outside its own bounds (fix #663) 2015-05-07 11:40:39 -03:00
David Capello
cc2a5e8cc5 Pressing two times BrushTypeField was making its popup always visible
There was an ugly combination of events:
1. When ContextBar::BrushTypeField receives an onItemChange is because the
   mouse button is pressed on it (a kMouseDownMessage)
2. It shows the BrushPopup window (which is a PopupWindow
   with kCloseOnClickInOtherWindow click behavior)
3. When other click is made in BrushTypeField, the BrushPopup is closed
   because it is filtering messages (since it's
   kCloseOnClickInOtherWindow). This generates a kCloseMessage in the
   queue.
4. BrushTypeField::onItemChange() is executed again (for the same
   click in point 3), and it checks that the popup is closed (recently
   closed, by this click), so it shows the BrushPopup again.
5. The enqueued kCloseMessage is receved by PopupWindow, and it calls
   stopFilteringMessages().

So in this case we have a visible PopupWindow that is not filtering
messages. To fix this bug we have included a startFilteringMessages()
in kOpenMessage. So when the popup is shown again, it filters messages
and the popup cannot stay visible.
2015-05-06 19:58:41 -03:00