Commit Graph

7823 Commits

Author SHA1 Message Date
David Capello
05b89eb83b Fix some OS X issues moving windows 2021-05-10 16:14:03 -03:00
Gaspar Capello
26faab7cb6 Add "Space+1/2/3" shortcuts to tile mode button tooltips 2021-05-10 11:55:28 -03:00
David Capello
d2c6abf5a7 Fix saving/loading correct frame position (mainly on macOS)
We have to save the frame position before we close the native
window.
2021-05-10 11:52:38 -03:00
David Capello
69a7faefa2 New default RgbMapAlgorithm to select what could works better at a given time 2021-05-09 20:53:09 -03:00
David Capello
1779e11f5e Use expandWindow() to expand/collapse some windows that were left behind in the refactor 2021-05-09 20:45:57 -03:00
David Capello
3b785133ea Add comment about possible future configuration for findBestfit2() 2021-05-09 17:41:11 -03:00
David Capello
712b948a29 Some minor refactors in octree code
* Moved static member functions of OctreeNode to .cpp file (and to
  private access because they are using only inside OctreeNode)
* Defined OctreeNodes type (alias for std::vector<OctreeNode*>)
* Changed m_pixelCount to size_t
* Added const modifier to some member functions
* Merged normalizeColor()+LeafColorToColor() -> rgbaColor()
* Refactor children() -> hasChildren() (because the function is only
  used to check if there are children in the node)
* Some initial values to member variables to remove constructors
  directly
* getModifications() -> modifications()
2021-05-09 17:36:17 -03:00
David Capello
8a22fe220c Use configured algorithm to convert RGB -> Indexed by default 2021-05-09 12:58:27 -03:00
David Capello
4c1a13bf07 More info about coding style 2021-05-04 18:32:38 -03:00
David Capello
19d7566249 Fix bug where F5 was resetting the color bar box size/zoom 2021-04-30 11:31:02 -03:00
David Capello
9c5b856aef Fix crash copying floating tilemaps 2021-04-30 10:47:57 -03:00
David Capello
d6acb9e20f Save/load main window layout correctly and limit to current workarea
* Now the restored frame position/maximized flag are saved correctly.
* We've improved the default size to the current workarea of the main
  screen.
* Limit the initial frame position to the current available screens
  (e.g. the saved frame position could be invalid if the user
  unplugged a monitor)
2021-04-29 16:13:45 -03:00
David Capello
0934a78db6 Add some comments in fit_bounds.cpp 2021-04-29 16:08:25 -03:00
David Capello
3eb8411ecc Fix bug removing used tiles with Auto mode in some special cases 2021-04-28 17:18:28 -03:00
David Capello
588a6dc63c Fix destruction order of native windows to avoid crashing
We've to send kCloseMessage first, and then destroy the native
window (so children native window are destroyed correctly when
kCloseMessage is received, e.g. ComboBox popup must destroy its native
window when it receives a kCloseMessage of the parent window).
2021-04-23 15:35:27 -03:00
David Capello
69c1bb1d99 Update laf module (don't give wintab32.dll a chance to overwrite our exception handler) 2021-04-23 15:34:28 -03:00
David Capello
8569cf449a Fix magic wand tool used in a transparent layer when cel origin=(0,0) 2021-04-22 15:46:07 -03:00
David Capello
ecbd845aae Merge branch 'main' into beta 2021-04-22 14:02:36 -03:00
David Capello
d7a1c71df0 lua: Add support for selection tools in app.useTool()
Fix https://github.com/aseprite/api/issues/37
2021-04-22 13:51:56 -03:00
Gaspar Capello
4d9d1f309c Fix regression: line tool draws extra pixels on the canvas edge
How the bug could be reproduced (before this fix):
- Select the line tool.
- Click and hold down the left mouse button on the canvas to put the first line point.
- Drag the mouse outside the canvas and move it around (like trying to put the second point of the line outside the canvas).
2021-04-22 10:47:24 -03:00
David Capello
63ec1f2ae8 Fix compilation error in clang 2021-04-22 09:57:18 -03:00
David Capello
1f5b6980d3 Fix File > Open initial position when multiple monitors are used
With this patch we removed the ui::get_desktop_size() function
too (now we can get the workarea of the display's screen).
2021-04-21 17:01:43 -03:00
David Capello
64b5a0175d Update laf module 2021-04-21 16:46:50 -03:00
David Capello
2e286fc3b1 Fix selecting correct list items in the combobox popup 2021-04-20 19:44:01 -03:00
David Capello
597a2cc831 Redir first kMouseMoveMessage with correct mouse position from combobox -> listbox 2021-04-20 19:42:41 -03:00
David Capello
5aa765a942 Fix default menu positions with (and without) multiple windows 2021-04-20 18:40:06 -03:00
David Capello
0d7fea3111 Fix several problems w/multiple screens
* Limit dialogs to the current screen workarea correctly
* Fixed several issues on macOS
2021-04-20 17:55:49 -03:00
David Capello
47434ee8f1 Don't change user-defined pos of Splitter when we resize the window 2021-04-20 15:14:12 -03:00
David Capello
660407c9b2 Switch multiple displays flag in runtime
Already created ui::Window are not modified and closed/reopened.
2021-04-20 14:14:54 -03:00
David Capello
c1be8f6727 Fix ColorButton color picking dragging the mouse without multiple displays 2021-04-20 13:01:49 -03:00
David Capello
0c932779fb Fix several issues with ui::ComboBox
* With multiple windows now a ComboBox popup has its own window (and
  the size of the popup is not limited to the parent display anymore)
* Clicking in the parent ui::Window that is below the ComboBox listbox
  in non-multiple windows mode doesn't start the resizing/moving loop
  of the window (the click now is sent to the listbox correctly)
* Limit the position to the workarea (in multiple-windows) and to the
  display (in non-multiple windows)
2021-04-20 12:13:19 -03:00
David Capello
e6bf19e1c1 Fix bug not re-using a tile when A=0 and RGB values are different
When alpha=0, we can ignore RGB values and re-use a tile in the
tileset.
2021-04-19 16:56:30 -03:00
Gaspar Capello
684ae08112 Fix regression: bug copying & pasting regular cels in the timeline
Before this fix if an image were allocated in the clipboard, then you
copied a Cel and wanted to paste it to other Cel, the previous image
were pasted in the canvas instead the last Cel copied in the timeline.

How to reproduce the bug:

- Make a sprite.
- Draw something on the canvas.
- Select a drawn region and copy the selection (the image is now in
  the clipboard).
- Add a frame in the time line.
- Copy the Cel of frame 1.
- Select the empty Cel of the frame 2.
- Paste: you'll see the image selected in step 3 was pasted on the
  canvas instead the last Cel copied on the timeline.
2021-04-19 15:57:21 -03:00
David Capello
80322af02e Use CityHash for tiles
This reduces the level of collisions between hash buckets between
different image tiles.
2021-04-19 15:56:47 -03:00
David Capello
b90c56487d Merge branch 'main' into beta 2021-04-16 14:13:05 -03:00
David Capello
32b5d20a8d Update laf module 2021-04-16 14:01:28 -03:00
David Capello
33db4281e7 Don't activate square aspect when we start a Rectangular Marquee w/Shift modifier
Regression introduced in 21e893162d to fix #2537
2021-04-16 13:58:12 -03:00
David Capello
ca41785f18 Fix regression: 'Simple Crosshair' mouse cursor dissapears when we switch to Eraser tool
Regression introduced in: ef4f691459
2021-04-16 12:09:49 -03:00
David Capello
4fe8c93c5c Fix regression cannot move/resize reference layers
Regression introduced in f3ab779bfd
2021-04-16 10:23:35 -03:00
David Capello
14c3cfe393 Fix conversions between layer <-> tilemap when grid origin != 0,0
We've changed a restriction for tilesets: grid's in doc::Tileset must
have origin=(0,0); and the origin of a doc::Grid only makes sense for
the sprite grid (where the origin is set by the user) or for a tilemap
cel (where the origin is the cel origin).
2021-04-15 21:26:45 -03:00
David Capello
cdf271af74 Avoid leaks running "gen" when memory sanitizer is enabled 2021-04-15 10:43:17 -03:00
David Capello
5bd83d0c1a Merge branch 'main' into beta 2021-04-15 10:35:36 -03:00
Gaspar Capello
3093eda958 Fix expandable windows with user data doesn't show correctly
Before this fix when we clicked on user data icon (to expand the window and show the user data), the expanded window were displayed incorrectly (some parts black, and other with an incorrent widget size).
2021-04-15 09:56:31 -03:00
David Capello
6dccb1986e Merge branch 'ccache' into main 2021-04-15 09:45:33 -03:00
Michał Janiszewski
1e24d69db6
Apply suggestions from code review
Co-authored-by: David Capello <davidcapello@gmail.com>
2021-04-15 14:29:46 +02:00
Michał Janiszewski
1f7c985735 Install CCache in CI 2021-04-15 11:54:53 +02:00
Michał Janiszewski
593bc8db0e Add CCache discovery to CMake 2021-04-15 11:51:42 +02:00
David Capello
de68fddbe7 Merge branch 'main' into beta 2021-04-13 19:12:46 -03:00
David Capello
a035f64d8d Simplify About dialog 2021-04-13 19:08:33 -03:00
David Capello
a926ca9055 Update cmark module 2021-04-13 18:41:22 -03:00