Commit Graph

132 Commits

Author SHA1 Message Date
David Capello 1ffbd4c343 Add new "Image Color" parameter in brush slots (fix #1259) 2016-09-20 10:26:02 -03:00
David Capello 1c7abd285e Add zoom/scroll buttons in ContextBar (including a new "Fit Screen" command) 2016-09-15 09:50:00 -03:00
David Capello 6377b550e3 Replace base::Signal/Observable* with obs::signal/observable
We can use the obs library directly for signal/slots and observable
objects.
2016-09-13 15:02:00 -03:00
David Capello 3333855db3 Fix Alt+1, Alt+2, etc. shortcuts to change the selected tool brush (fix #1195) 2016-09-12 12:22:48 -03:00
David Capello 92db283cbc Show pin only in fg/bg color selector dialogs 2016-09-08 15:31:22 -03:00
David Capello 5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello 1c984696c1 Select active color bar selection when we change to shading ink 2016-07-01 16:24:29 -03:00
David Capello 5ce7f24463 Add tooltip to paint bucket settings button in context bar 2016-05-04 10:06:21 -03:00
David Capello 6dc9bb984d New option for paint bucket using all layers as reference/stop fill (fix #969) 2016-05-03 15:31:27 -03:00
David Capello 918acb6bc8 Don't focus context bar when we use selection behavior modifiers (fix #1103) 2016-05-02 12:25:51 -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 5f90ef7c9b Add properties in App to access directly to timeline/contextBar/workspace 2016-04-22 13:19:06 -03:00
David Capello c5f7e9618b Use the real current tool preferences to draw and in the brush preview
The "real" current tool is the one in the editor returned by
getCurrentEditorTool() (which depends on quicktool modifiers
and right-click configuration).
2016-04-21 01:20:59 -03:00
David Capello 2ce09c53dd Add customization for square aspect, draw from center, and move origin keys (fix #1028)
Some changes:
- Now ui::Keys aren't processed in app::tools side, they are processed
  in Editor side and converted to ToolLoopModifiers flags.
- Replace ToolLoop::getSelectionMode -> ToolLoop::getModifiers()
2016-04-04 18:46:48 -03:00
David Capello 5c61e92193 Change custom brush color when we change fg/bg colors 2016-02-25 18:48:59 -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 67878a21cb Save brush with images correctly when "Save Brush" button is used 2016-02-18 14:43:40 -03:00
David Capello 24e329ffeb Show ink selector even when a custom brush is selected
Related to #945, anyway it needs more work so we can mix the custom
brush as a color source for the current ink.
2016-02-15 20:40:37 -03:00
David Capello 8ca5b0c2f7 Shade ink should use the full palette when we select just one color (fix #947) 2016-02-15 17:30:01 -03:00
David Capello e2e5fbf3f1 Fix crash when ContextBar::InkShadesField is clicked and it's empty 2016-02-15 17:07:34 -03:00
David Capello 2cac6a0706 Don't show shading on effect tools (Eraser, Blur, Jumble) 2015-12-22 17:05:33 -03:00
David Capello a3e77a657a Update context bar controls correctly when a new brush type is selected from a brush slot 2015-12-17 15:21:44 -03:00
David Capello 0fbe3acfd0 Remove BrushPopupDelegate
At this moment we prefer to use AppBrushes and ContextBar directly
from BrushPopup.
2015-12-17 13:24:44 -03:00
David Capello 0cdc71bf05 Add possibility to save brush type/size/angle, fg/bg colors, ink type/opacity, shade, etc. into brush slots
Fix #904
2015-12-16 17:27:04 -03:00
David Capello 53b8eb7c4d Don't use ContextBar from BrushPopup 2015-12-15 18:17:21 -03:00
David Capello 2d64a1926e Improve BrushPopup to save custom brushes (type/size/angle params)
We moved custom brushes stuff from ContextBar to app::AppBrushes class.
And now we can access the list of brushes from app::App::brushes() member.
2015-12-15 17:12:11 -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 f9b249fba7 Add option to switch auto-opaque/transparent option in ContextBar popup menu 2015-12-01 16:37:46 -03:00
David Capello e8dd1526f6 Convert ink menu into a popup menu specified in gui.xml 2015-11-27 11:36:27 -03:00
David Capello aaf49be654 Add commands to change ink type (#787)
By default there are no shortcuts to change the ink type.
2015-11-27 01:35:31 -03:00
David Capello c33e63bed7 Fix bug destroying ShadeWidgets of Select type
We don't need to listen the ColorBar in shade widgets that are used
in the menu popup.
2015-11-26 20:09:53 -03:00
David Capello 8a7a585362 Load/save shades in user preferences (close #85) 2015-11-25 15:17:34 -03:00
David Capello 0f8997b3df Add drag-and-drop of colors in shade widget (#85) 2015-11-25 12:29:19 -03:00
David Capello cf7c4754cc Convert InkShadesField in a combobox-like widget to store several shades (#85)
Changes:
* Added new ui::IconButton widget to create widgets with one skin icon
  that is colored depending on the button state.
* ContextBar::InkShadesField was divided into a couple widgets (ShadeWidget
  and IconButton to drop-down a little menu with saved shades)
* Fixed CommonLockedSurface::drawColoredRgbaSurface() impl.
* Removed invalid gfx::setr/g/b/a() functions.
2015-11-24 18:37:13 -03:00
David Capello 25a331c43a Fix shades field preferred size when UI scaling > 100% 2015-11-23 15:05:35 -03:00
David Capello e683b8fb1a Switch shading colors with X key
Related to #85 and #854
2015-11-20 18:44:08 -03:00
David Capello 6cbb1882d4 Add shortcut to switch pixel-perfect mode (fix #858) 2015-11-18 16:15:25 -03:00
David Capello c29fd79796 Remove commented code in context_bar.cpp to select dots freehand algorithm 2015-11-18 15:32:48 -03:00
David Capello e5397d9ad3 Don't show symmetry controls on tools like eyedropper/move/zoom 2015-10-29 12:52:22 -03:00
David Capello 56854cdb9f Add symmetry mode (fix #208)
This is a first iteration of the feature, it doesn’t have handles to
move the symmetry line and it only contains two symmetry modes:
horizontal or vertical.

As an extra change, we have added the new Stroke type to wrap a vector
of gfx::Points and simplify some existing code in the ToolLoop.
2015-10-26 17:51:32 -03:00
David Capello 460d4b47c9 Add missing "override" modifier on some member functions
These ones were detected by clang-700.0.72
2015-09-30 16:34:43 -03:00
David Capello 984059e1bc Avoid selecting all RGBA+Index buttons in FilterTargetButtons 2015-08-28 15:41:02 -03:00
David Capello d994d67a2a Fix crash using Shading mode with sprites with different palette sizes 2015-08-28 12:22:32 -03:00
David Capello 62f90a1a76 Fix wording in empty ContextBar::InkShadesField widget 2015-08-27 08:10:09 -03:00
David Capello f3ac563e33 Add shading ink (fix #85) 2015-08-26 16:48:01 -03:00
David Capello 75a743f141 Separate pivot visibility and location options 2015-08-14 10:09:15 -03:00
David Capello 32bf3314e6 Add a new simple/default ink
This ink behaves as alpha compositing but doesn't use the opacity slider
(opacity is used from current color's alpha channel). Also, in case that
we pick the mask color, it behaves as the eraser tool.
2015-08-13 13:26:52 -03:00
David Capello e76d25283a Remove unused variable in ContextBar::BrushTypeField class 2015-08-06 17:37:16 -03:00