Commit Graph

79 Commits

Author SHA1 Message Date
David Capello 1b715010bd Add tooltip to "new frame" button in status bar 2016-05-04 10:04:32 -03:00
David Capello 97d9b3cb31 Go to frame field in status bar isn't focused by default anymore (fix #1113) 2016-05-04 10:00:54 -03:00
David Capello 93c616cd7b Don't change two times the status bar text when the selected tool changes 2016-04-25 15:29:06 -03:00
David Capello a09b00dba8 Fix synchronization of different UI elements depending on the active tool
With this patch now the context bar shows the real active tool
preferences. For example, if we choose the option to use the Eraser
tool with right-click, now right-clicking will draw with the Eraser
brush size (instead of using the selected tool/left-click tool brush
size).

Changes:
* Removed the toolBox.activeTool() field from preferences
  (as the option isn't persisted between sessions)
* Added an observable app::tools::ActiveToolManager class to sync all
  UI elements that depend on the active tool and ink.
* Moved a lot of "active tool" logic from app::Editor to the
  new ActiveToolManager
* Moved app::tools::ToolLoopManager::Pointer as an indepedent
  app::tools::Pointer class
2016-04-25 15:20:53 -03:00
David Capello d363f29840 Fix timeout in StatusBar::showTool() 2016-04-25 13:26:39 -03:00
David Capello 7c2786164d Remove unused variable 2016-04-21 13:31:24 -03:00
David Capello fcca96d6a3 Add missing text in StatusBar::showColor() 2016-04-19 15:43:12 -03:00
David Capello 87ef48b50b Improve status bar with icons/automatically generated and re-used parts (fix #752) 2016-04-19 13:45:23 -03:00
David Capello 0605166cc6 Move clock/tick from "she" to "base" library and switch to uint64_t type 2016-03-29 16:19:23 -03:00
David Capello c09dfa89f0 Show grayscale colors in color buttons when we're editing a grayscale image 2016-02-24 19:37:20 -03:00
David Capello 455153d4b9 Change ui::TipWindow public API
Arrow align and target bounds are given as parameters of the new
TipWindow::pointAt() member function. Now TipWindow() contains a
default ctor.
2015-12-10 16:50:16 -03:00
David Capello d467d71fa5 Rename PopupWindow enums 2015-12-05 15:56:32 -03:00
David Capello e944ce0052 Move Bind, Connection, Signal, Slot, etc. to base namespace 2015-12-04 15:17:42 -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 cdd955441a Rename PreferredSize -> SizeHint 2015-12-03 21:50:05 -03:00
David Capello 4dc6da286e Add zoom slider in StatusBar (issue #420) 2015-08-14 19:46:48 -03:00
David Capello fa53692221 Remove the cel opacity slider from the status bar
It added more noise to the screen for a feature that is uncommonly used.
2015-08-14 15:37:21 -03:00
David Capello 53a925e86d Remove SkinParts enum
Now we generate the list of SkinTheme parts from the skin.xml file using
the gen utility.

Several refactors included in SkinTheme class to simplify code.
2015-08-04 19:38:52 -03:00
David Capello 056e365cc3 Use a PopupWindow instead of a TipWindow for SnapToGridWindow 2015-07-28 14:55:40 -03:00
David Capello a7ea0f7ec5 Add "Snap to Grid" indicator when it's enabled (fix #122) 2015-07-28 13:05:59 -03:00
David Capello 9e5ccbcca9 Remove StatusBar color names in status_bar.cpp 2015-07-28 12:25:15 -03:00
David Capello be6779631b Modify eyedropper tool to pick colors with alpha and support several modes
Issue #286
2015-07-02 18:13:47 -03:00
David Capello a2538628c7 Convert ui::Widget::border_width/child_spacing to private fields 2015-06-23 19:20:49 -03:00
David Capello f01b816fb5 Remove JI_ prefix from ui/base.h constants 2015-06-23 14:00:00 -03:00
David Capello 5a97f4b129 Adjust StatusBar's opacity slider min size depending on window resizes 2015-06-10 17:17:27 -03:00
David Capello 23a4cb3a0b Fix some problems updating the StatusBar cel opacity slider
Now the StatusBar observes changes in the cel opacity to update the
slider (e.g. when we change the cel opacity through Cel > Properties
menu, the StatusBar refresh its slider).
2015-05-19 16:39:47 -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 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 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 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 aae3e69fda Fix bug showing frame # and opacity slider in StatusBar without an active document 2015-04-16 13:14:39 -03:00
David Capello 5a5a6fe4f6 Replace slider_change_hook() with StatusBar::onCelOpacityChange() 2015-04-16 13:07:14 -03:00
David Capello 4e1cebf966 Give some timeout to lock the sprite in certain operations 2015-04-15 09:59:36 -03:00
David Capello 8353e45ae8 Add tooltip for StatusBar::m_currentFrame 2015-04-10 11:23:21 -03:00
David Capello 669765c708 Fix StatusBar::onResize() layout when we don't have enough width 2015-04-10 11:21:37 -03:00
David Capello 1bed018ab0 Add timeout parameter to Context/Document lock/unlock operations 2015-04-10 11:10:42 -03:00
David Capello 45f4d30450 Remove unused variables/functions 2015-04-09 11:36:09 -03:00
David Capello c571eafdd0 Replace StatusBar progress bars with a slider/progress bar in ui::Alert 2015-04-07 12:18:21 -03:00
David Capello ae90e8089c StatusBar: Add cel opacity tooltip 2015-04-07 11:15:45 -03:00
David Capello 41309b369d Add "Frame:" label in StatusBar 2015-04-07 11:15:28 -03:00
David Capello 0576bafaa3 Move animation controls from StatusBar to Timeline 2015-04-07 10:48:04 -03:00
David Capello 82c485a054 StatusBar: Improve animation buttons style using a ButtonSet
Also now the play button changes to a stop button when the animation is
begin played.
2015-04-07 02:29:33 -03:00
David Capello 4fe1e9771e Animation controls always visible in StatusBar 2015-04-07 01:21:31 -03:00
David Capello 486ab7dfc1 Show alpha letter instead of "Alpha" text in StatusBar 2015-04-06 20:11:41 -03:00
David Capello 294ff0e4f6 Rename src/app/util/misc.[cpp/h] -> new_image_from_mask.[cpp/h] 2015-04-02 09:55:18 -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 660b23e471 Remove "notification area" from StatusBar (the "donate" link) 2015-02-26 10:01:04 -03:00
David Capello 2c6067f7e4 Update license of app/ module to GPLv2 2015-02-12 12:16:25 -03:00
David Capello 3ebb708000 Add CelData to share image/position/opacity between linked cels
Changes:
- Merged app::cmd::ObjectIO into doc::SubObjectsIO
- Changed app::cmd::SetCelImage with app::cmd::SetCelData
- Added Cel::createCopy/Link() to avoid confunsion with Cel copy ctor
- Renamed Sprite::getImage() -> getImageRef()
- Added Sprite::getDataCelRef()
- Added doc::CelsRange helper to iterate cels
- Added Sprite::cels()/uniqueCels() member functions (removed
  Sprite::getCels())
- Added DocumentRange::convertToCels()
2015-02-09 11:40:43 -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