David Capello
07b67a66f7
Add app::IColorSource interface to get pixels from widgets from mouse pos
...
This is consumed by ColorButton which can be dragged to use a eyedropper
in different widgets.
2016-03-17 17:16:35 -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
0cf39625f8
Minor fix in PaletteView::setBoxSize() to apply the guiscale() to the box size
2016-02-24 17:37:36 -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
2949ff0a7c
Improve UI to drag-and-drop colors and the resize handle (related to #772 )
2015-08-27 08:09:13 -03:00
David Capello
dd6c028477
Add handle to resize the palette ( fix #754 )
2015-08-20 12:08:08 -03:00
David Capello
cb867b7f84
Re-implement GIF decoder to load some .gif files correctly ( fix #729 )
...
- Better palette creation depending on local colormaps
- Reuse palette colors from previous frames
- Use frame transparent index correctly
- Convert to RGB automatically if the image has more than 256 colors
- Remove onPostLoad()
- Add progress bar feedback
2015-07-17 12:26:11 -03:00
David Capello
17bffc81c3
Fix Ctrl+mouse wheel in ColorBar to modify the size of each color box when UI Scaling > 100%
2015-07-06 16:46:12 -03:00
David Capello
f6bf4e36a8
Fix PaletteView::onPaint() when multiple entries are being dragged
2015-07-06 13:56:53 -03:00
David Capello
32785562dd
Show new palette size feedback in StatusBar when we drag-and-drop colors
2015-07-05 19:41:11 -03:00
David Capello
b085fee918
Improve drag-and-drop in ColorBar/PaletteView widget
2015-07-04 19:11:50 -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
318bc2e2f9
Add alpha channel to palette/color bar/color selector (issue #286 )
2015-06-30 17:36:37 -03:00
David Capello
60a3da7b7c
Fix PaletteView::setColumns() to set a correct number of columns for small palettes
...
If we have a palette with few colors (e.g. just one row of colors), we
would like to setup a columns number equal to the whole available
PaletteView width. This is because when we drag colors, we can drop them
in position that are outside the current palette size.
2015-06-29 12:33:41 -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
07f42d620d
Change cut/clear behavior to remove palette entries
2015-06-18 16:20:42 -03:00
David Capello
f19e1dc477
Add ability to drop colors outside the palette range
...
Like in the timeline, now we can drop colors out of the palette bounds
to create more entries.
2015-06-18 15:50:00 -03:00
David Capello
89e0392daa
Add support for palettes with more less (and more) than 256 colors ( fix #668 )
...
With this commit we've removed doc::Palette::MaxColors constant.
2015-06-18 12:50:33 -03:00
David Capello
21ca87862c
Add layer blending modes ( fix #318 )
...
- Added doc::BlendMode enum and doc::BlendFunc type
- Renamed LayerImage::getBlendMode() -> blendMode()
- BLEND_MODE_COPY is BlendMode::SRC now
- BLEND_MODE_NORMAL is BlendMode::NORMAL now
- Added app::cmd::SetLayerBlendMode
2015-06-13 21:29:16 -03:00
David Capello
27485b7ff6
Fix problem selecting transparent color from the ColorBar with middle button
...
When we move the mouse with the middle mouse button, we must trigger
onPaletteViewIndexChange() delegate in any case (the middle button
doesn't change the m_currentEntry).
2015-05-21 16:25:41 -03:00
David Capello
13aef4eecf
Add support to change the transparent color with middle click
2015-05-20 12:11:47 -03:00
David Capello
1ff4f06a69
Show transparent index in ColorBar with a little dot
2015-05-20 11:40:22 -03:00
David Capello
ae048f5756
Avoid including ColorBar in PaletteView
2015-05-20 11:38:38 -03:00
David Capello
7278f649f4
Select exact RGB match when we use eyedropper in RGB images
...
Fix #16
2015-05-11 11:25:53 -03:00
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