Commit Graph

39 Commits

Author SHA1 Message Date
David Capello 2ac04c1c16 Show foreground/background color indicators in ColorBar
Related to #16 and #545
2015-05-11 10:53:50 -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 9fc7b993d4 Add ability to cut colors in the ColorBar 2015-05-10 21:36:46 -03:00
David Capello 38526f3b9e Rename PaletteView::clearSelection() -> deselect() 2015-05-10 19:23:30 -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 2bbaa45844 Unify Cut/Copy/Paste/Clear handling with InputChain class 2015-05-09 19:55:33 -03:00
David Capello 11d86bb7c5 Add ability to copy colors using Ctrl + drag & drop 2015-05-09 15:57:46 -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 2995190d00 Fix crash making palette entries too small using scroll wheel 2015-05-08 17:00:44 -03:00
David Capello d3dbc11451 Add options to change palette entry size 2015-05-08 14:59:52 -03:00
David Capello 45f4d30450 Remove unused variables/functions 2015-04-09 11:36:09 -03:00
David Capello 3e44399e4b Remove unused local variables 2015-03-25 16:38:56 -03:00
David Capello fd62a60472 Save ColorBar box size in preferences 2015-03-23 14:39:21 -03:00
David Capello a1d2b5e0dc Change palette view's box size with Ctrl+mouse wheel 2015-03-23 13:28:16 -03:00
David Capello d14e4e8896 Add support to drag-and-drop colors in ColorBar/PaletteView (fix #37) 2015-03-23 12:25:32 -03:00
David Capello d41b08caa8 Add UI to drag and drop colors in PaletteView 2015-03-20 15:29:44 -03:00
David Capello 26970832ac PaletteView: highlight selection outline when the mouse is over it 2015-03-20 14:46:48 -03:00
David Capello 8f1ac5f488 Add PaletteView::getPaletteEntryBounds() to simplify paint/hit-test code 2015-03-20 08:44:39 -03:00
David Capello a79acfd24c Handle mouse selection in PaletteView like in the Timeline 2015-03-19 19:45:44 -03:00
David Capello 811e56a819 Remove PaletteView::setBoxSize() member function 2015-03-19 19:45:31 -03:00
David Capello e2b8d2be31 Draw PaletteView selection like Timeline selection 2015-03-19 19:45:12 -03:00
David Capello 2c6067f7e4 Update license of app/ module to GPLv2 2015-02-12 12:16:25 -03:00
David Capello ca9df1a05e Rename ui::jguiscale() to ui::guiscale()
* Change Theme::guiscale member to Theme::m_guiscale
2014-11-25 22:33:45 -03:00
David Capello 0a7bbfba6b Add PaletteIndexChangeEvent for PaletteView::IndexChange event
This was added to avoid deprecated jmouse_b(0) function
in ColorBar::onPaletteIndexChange().
2014-11-25 21:51:06 -03:00
David Capello 63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello a2718f83e4 Remove Allegro dependency from several files 2014-08-22 01:32:13 -03:00
David Capello 4b7bf5b835 Merge she::Color and ui::Color types in gfx::Color 2014-06-28 16:10:39 -03:00
David Capello dbad153698 Add she::Font class (wrapper of Allegro FONT)
This is an huge refactor to avoid handling Allegro FONT directly. Some
changes:
* Add she::System::defaultDisplay/Font, createRgbaSurface, loadSurface,
  and loadRgbaSurface.
* Rename she::CreateSystem/Instance to she::create_system/instance.
* Remove ui/font.cpp and move ui/fontbmp.cpp to she library.
* ui::IButtonIcon uses she::Surface instead of BITMAP.
* Rename she::LockedSurface::drawAlphaSurface -> drawRgbaSurface
* Rename ui::SetDisplay -> set_display
* Rename _ji_font_text_len -> ui::Graphics::measureUIStringLength
2014-06-22 18:53:14 -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 c56d3d1170 Fix for PaletteView: redraw it when the palette is changed 2014-06-01 18:09:19 -03:00
David Capello ec61c6b972 Add support for horizontal mouse wheel and scroll bar notifications (better support for trackpads)
WM_HSCROLL/WM_VSCROLL messages are used by some trackpads drivers to
notify about horizontal/vertical pan gestures.
2014-04-28 22:02:56 -03:00
David Capello dd2ce20e25 Win32: Add support to convert mouse messages (WM_) to ui::Messages (using she::Events)
On Windows, instead of polling Allegro mouse position/buttons we can use
the mouse messages (WM_*) directly to generate she::Events. Those events
are received by the ui::Manager and converted to ui::Messages.
Maybe this is a possible fix for issue #133 (Wacom tablets don't work
properly).

Changes:
- Don't use jmouse_z() directly (new ui::MouseMessage::wheelDelta() member)
- Add ui::_internal_set_mouse_position() to change the jmouse_x/y(0)
  from the new mouse position received in she::Events. The same for
  ui::_internal_set_mouse_buttons().
- Modify the ui::Manager to generate mouse events in any case: using old
  Allegro 4 polling method, or from she::Events.
2014-04-17 22:23:12 -03:00
David Capello 6ad54689dd PaletteView: Apply jguiscale() to initial m_boxsize 2014-04-17 14:46:23 -03:00
David Capello 8dc869e1de Move drawing code of PaletteView widget from kPaintMessage to onPaint() 2014-04-13 16:26:00 -03:00
David Capello 01d79ddf9b Merge branch 'dev' of git@github.com:dacap/aseprite.git into dev 2013-11-09 20:00:16 -03:00
David Capello e5ba8e0922 Encapsulate Image implementation (private members, accessors, iterators, etc.)
- Rename _rgba/_graya to raster::rgba()/graya()
- Add raster::color_t type (alias for uint32_t)
- Rename raster::GfxObj to Object. And GfxObj::getType() to Object::type()
- Move conversion from raster::Image/Palette to Allegro BITMAP/RGB
  to raster/conversion_alleg.h file
- Add raster/color_scales.h
- Rename image_* functions to raster/primitives.h
- Reimplement ink processing with templates instead of macros
2013-11-09 19:59:05 -03:00
David Capello dbf4d0d490 Replace JRect/jrect struct with gfx::Rect
- Replaced Widget::rc -> Widget::m_bounds private member.
- Added Widget::offsetWidgets() method.
- Removed View::displaceWidgets().
2013-10-26 12:50:55 -03:00
David Capello cde54f3682 Change BSD license to MIT in sublibraries and fix headers 2013-08-08 21:01:20 -03:00
David Capello c88f9b172b Refactor: Move app files to src/app subdirectory inside app namespace
- Add HAVE_CONFIG_H wrapper to #include "config.h"
- Removed widgets namespace (it's in app now)
- Move some functions from src/file/file.h to src/base/cfile.h
- Move Vector2d to base library
- Rename MenuItem2 to AppMenuItem
2013-08-05 21:20:19 -03:00