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
We're going to keep this section for a couple of versions as old users
get used to the new Workspace Layout customization.
The "Position" section will contain the layout icon so we can switch
the Workspace Layout combobox from there too,
@dacap's notes: A description of the included changes:
* Improve UX auto-saving layouts when docks are modified, and new 'X'
icon to delete layouts (or reset the 'Default' layout).
* Remove old timeline position controls (Left/Right/Bottom buttons)
from the Timeline configuration and from the layout selector
* Add support to drag and drop docks to other sides with real-time
feedback using a semi-transparent UILayer
* Add a context menu w/right-click to dock the widget at the supported
sides without drag-and-drop
Some review comments in https://github.com/dacap/aseprite/pull/2
This patch includes:
* The layout is updated immediately when docks are resized (before
this the layout was like a snapshot of the configuration when the
layout was created or overwritten with the "New Layout" option)
* Saving the active layout used in
preferences.general.workspace_layout so we can restore it after
restarting Aseprite
* Change "UI Layout" to "Workspace Layout"
* Some strings moved to en.ini file for i18n
* Fixed a crash on MainWindow::onActiveViewChange() when the
application was being closed
This happens only in memory at the moment (layouts are not saved in
disk yet), and the customization is quite simple (only size of
splitters, timeline position). But in the future we should be able to
dock elements in any place.
Changes:
* Now we use the "user data" icon as the button to expand the layouts
combobox
* Added a tooltip to this icon
* Added buttons to configure the Timeline position in the same
combobox
* Fixed some bugs in Dock using space for hidden widgets
Some missing features so far:
1) Restore old layout configuration (color bar split pos, timeline
pos, etc.) and migrate to new Dock layout
2) Load/saving Dock layout
3) Create & customize current layoout (drag-and-drop widgets, etc.)
This was a pending refactor, where "user.aseprite-keys" files were
already using the "shortcut" attribute (instead of "accelerator").
This will include a refactor in the Weblate projects/all translations
to change [select_accelerator] section to [select_shortcut]. But that
must be coordinated after this commit is merged.
This fix adds an option to scale timeline thumbnails to fill
the entire cell, or simply leave the timeline thumbnails at 1:1 scale
as before issue #4974.
* Each widget can customize its text baseline (onGetTextBaseline()) to
know where to draw text when it's vertically aligned to the middle
(now more correctly "aligned to the baseline").
* Add PAINT_BASELINE to test where the baseline is on each widget.
* "Aseprite" and "Aseprite Mini" fonts now have a special
descent/ascent configuration with a specific baseline position.
Includes:
* New ui::Style::rawMargin/Border/Padding() to detect what values are
undefined, and ui::Style::margin/border/padding() to return normalized
values (replacing kUndefinedSide with 0 when a value is not defined in
the whole hierarchy of styles). With this change we avoid using a
margin/border/padding value of -1 by mistake.
* New guiscaled_div() to calculate an integer division taking care the
guiscale() for a scaled value.
* CALC_FOR_CENTER() renamed to guiscaled_center() and moved to ui/scale.h
There are still a lot of work to be done to fully fix these UI issues
between Screen Scaling=200%/UI Scaling=100% vs Screen Scaling=100%/UI
Scaling=200%
This fixes the ASSERT(!m_tx) in FilterManagerImpl::initTransaction()
in Debug mode, and a crash in Release that happens in any filter if we
cancel a filter progress in the middle, and then press the "OK"
button.
Parts of this commit are from #4968 and will be useful to reuse in the
multiline TextEdit widget.
Co-authored-by: Christian Kaiser <info@ckaiser.com.ar>