Fix issue below:
In multi-monitor setups, native windows, e.g. the preview window, will,
when re-opened, be moved/clamped to the monitor of the main aseprite
window even if the re-opened window was previously and explicitly moved
to a different monitor.
Fixes a regression found after merging #5414:
https://github.com/aseprite/aseprite/pull/5414#issuecomment-3286339563
We always expected a sRGB color in ui::Graphics API and we can specify
a color in another color space using the ui::Paint version of its
member functions.
Several functions related to color spaces are now using a ui::Display
to receive the specific display where we're going to paint, instead of
using os::System::instance()->defaultWindow()->colorSpace().
* Added AppShortcut::fitsBetterThan() to compare shortcuts and decide
which one is better depending on the current key context and the ones
where shortcuts are defined
* Added Key::fitsContext() to known if this key definition makes sense
for a given current key context, e.g. Normal context can be used in
SelectionTool context, and SelectionTool can be used in Transformation
* Added KeyboardShortcuts::findBestKeyFromMessage() to centralize the
keyboard shortcuts matching moving some code from
CustomizedGuiManager::processKey()
* Added more keyboard shortcuts tests (including some for #5390)
We need a list of shorcuts (AppShortcuts) similar to ui::Shortcuts but
including the key source to compare later where the shortcut was
defined and give more priority to the user-defined shortcuts. This
logic is not yet added, this patch is only a refactor.
This gets rid of the following warning:
```
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:441 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (HarfBuzz). This can lead
to problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:114 (find_package_handle_standard_args)
aseprite/cmake/FindHarfBuzz.cmake:33 (include)
CMakeLists.txt:173 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
```
By applying the following change:
407fa892d9
The file could use further updates based on the upstream version.
This fix solves color space missmatch in the following UI elements:
- Timeline thumbnails
- Palette entries
- Tileset entries
- Color Spectrum and Wheels
- Color Popup Gradients
- Color Button
This adds a new button in the context bar so we have the three
available options to handle a transformation/drop pixels:
* Drop pixels and deselect (Esc key)
* Drop pixels but keep the selection (Enter key), new "Apply" command
* Discard changes/undo (Ctrl+Z)
This adds a new key context (Transformation) and also fixes tooltip
shortcuts on context bar buttons to show the current configured
shortcut for each action.
Reverts debab653fa and 194f8424a8