Commit Graph

3670 Commits

Author SHA1 Message Date
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
David Capello
f7465771b0 Add Ctrl+A (or Cmd+A) to select the whole text in ui::Entry 2015-05-06 18:11:29 -03:00
David Capello
24c3c3e3a3 Add '=' key has alternative to '+' (as in US keyboards plus sign is Shift+'=') 2015-05-06 18:02:59 -03:00
David Capello
9f39f4384c Add a menu option to lock/unlock each brush
This is an alternative to lock brushes using its keyboard shortcut.
2015-05-06 17:39:40 -03:00
David Capello
9dfd5ae0d3 Fix conflict between two classes named app::Item (in brush_popup.cpp and data_recovery_view.cpp)
This conflict was generating a crash when the "Recover Lost Sprites"
button was pressed.
2015-05-06 17:23:43 -03:00
David Capello
cb5fd3963f Fix problem where the cel opacity slider in StatusBar was not activated
After creating a new cel from a tool loop, we have to generate an
ActiveSiteChange notification (because now we have a cel in the active
position). In this way the StatusBar can update/enable the opacity slider.
2015-05-06 17:08:08 -03:00
David Capello
c6c7439566 Close autocomplete popup when we change the active folder in FileSelector 2015-05-06 16:58:32 -03:00
David Capello
05fb32bb84 Fix navigation keys for OS X and Windows
On OS X we can use Cmd+[ or Cmd+] to navigate the history. And Cmd+Up/Down
to go to the enclosing folder, or enter in a folder respectively.

On Windows we can use Alt+Left/Right to navigate the history. And Alt+Up
to go to the enclosing folder. (Alt+Down is an extra shortcut to enter
in the folder).
2015-05-06 16:47:43 -03:00
David Capello
4e911b7eea Esc key close the combobox popup 2015-05-06 16:27:45 -03:00
David Capello
a30f374bd5 Don't popup an empty listbox if the combobox is editable and has open-on-click style 2015-05-06 13:07:54 -03:00
David Capello
a0ea3ae07b Fix bug trying to remove one keyboard shortcut when other is removed instead
We've to regenerate all buttons that modify a specific keyboard shortcut
because they are listening the Click signal with the specific index of
the that shortcut. The index is given as parameter to the Signal connect()
function.

We've converted all buttons to shared pointers to simplify the code.
2015-05-06 12:13:35 -03:00
David Capello
decaa6510f Add TODO comment for SkinParts enum 2015-05-06 10:53:01 -03:00
David Capello
d0fe427805 SkinProperty doesn't have mini font by default 2015-05-06 10:50:21 -03:00
David Capello
eeb6d6e1b5 Fix problem resetting fonts after F5 for widgets with "mini font" (after theme is reloaded)
There are some widgets (e.g. fg/bg color buttons in the ColorBar, and
ContextBar's check-boxes) that use a "mini font". We could setup the mini
font in onInitTheme(), but the whole program is not ready to do something
like that (there are too much child_spacing/borders values that are set
outside onInitTheme).

A better way is to ask to the theme itself (Theme::getWidgetFont())
about what font to use for each specific widget. And the Widget::m_font
field can act as a cache of this requested font. So now the "mini font"
is specified in a SkinProperty's flag.
2015-05-05 19:14:33 -03:00
David Capello
fed03e7d7b Continue playing animation when we scroll 2015-05-05 15:31:25 -03:00
David Capello
91c2872908 Fix bug showing "&&" in About dialog 2015-05-05 13:41:27 -03:00
David Capello
a489efdf03 Use ContextObserver to update the StatusBar
Instead of calling StatusBar::updateUsingEditor(Editor*), now the StatusBar
is a ContextObserver that observe changes in the active doc::Site. The
Editor notifies a ActiveSiteChange event when the active frame/layer
is changed.

Fix #657
2015-05-05 13:24:26 -03:00
David Capello
c3d7a96a87 Replace ContextObserver::onActiveDocumentChange() with onActiveSiteChange() 2015-05-05 12:58:50 -03:00
David Capello
14d369404e Use new filename_formatter() in tests (fix #658) 2015-05-05 12:04:20 -03:00
David Capello
53e25770b1 Status bar should not eat Enter key when it isn't focused (fix #660) 2015-05-05 09:47:05 -03:00
David Capello
a4db7ff0eb Ignore current ink mode for custom brushes 2015-05-04 19:18:12 -03:00
David Capello
88930a6d69 Replace PRINTF with TRACE in TwoPointsController 2015-05-04 19:04:11 -03:00
David Capello
01cffe202e Fix comment in app/tools/controller.h's include guard 2015-05-04 19:03:50 -03:00
David Capello
bdf28c01de Fix problem initializing oldX/Width fields for the docked tab
This fixes a problem creating interpolation between random
oldX/Width values and x/width fields. I've added some special values
in the initialization of a Tab to know if we are using uninitialized
values oldX/Width/x/width values in the animation.
2015-05-04 18:16:29 -03:00
David Capello
ae03dd5461 Don't use last selected document as active document if UI is enabled
Related to bug found in #656. In this way, if the UI is enabled,
the active document is != null only if there is an active view for it.

Anyway, in batch mode we can potentially have a lot of bugs. There are
several UI commands that think that active view != null (and
current_editor != null) when the active document != null.
2015-05-04 16:25:28 -03:00
David Capello
4f33bef43c Command::short_name() is id() now
(Fix compilation in Release mode.)
2015-05-04 16:08:15 -03:00
David Capello
5538c5a749 Update all tabs (main Tabs and from subpanels) when a document is modified 2015-05-04 15:52:00 -03:00
David Capello
53e572eaf5 Rename TabsDelegate::isModifiedTab() to isTabModified() 2015-05-04 15:33:05 -03:00