Commit Graph

10204 Commits

Author SHA1 Message Date
David Capello 2e37ac9b83 [build] Don't use unsupported ${var,,} syntax on some shells (fix #5082) 2025-04-18 22:43:36 -03:00
David Capello 753d892af2 [build] read -N 1 is not supported on macOS bash 2025-04-18 22:43:18 -03:00
David Capello 8a8ddbc630 Improve performance loading list of fonts using an app::Task
We list the fonts in a background thread to fill the list of fonts in
the UI. And now we are inserting the fonts in alphabetical order.
2025-04-18 19:56:56 -03:00
David Capello 943c3b28df Merge branch 'main' into beta 2025-04-17 21:10:04 -03:00
David Capello d9a138357e Update modules 2025-04-17 20:34:07 -03:00
David Capello 978000a9dd Better support to use system fonts from themes
* There is a new system="" attribute for <font> elements
* New <font><windows ... /><macos ... /><linux /></font> elements to
  select platform specific fonts
* Fixed several bugs related to re-using fonts from the cache when
  customizing the current theme font from Edit > Preferences > Theme
* Removed Fonts::infoFromFont() adding FontInfo(FontData) constructor
2025-04-17 19:43:32 -03:00
David Capello b3f4e37b69 Add option to switch font hinting (fix #4931, aseprite/laf#138) 2025-04-11 17:26:03 -03:00
David Capello d8632b6208 Move misc/ scripts to laf library 2025-04-11 09:03:28 -03:00
David Capello 3c4d012210 [ci] Fix slow tests 2025-04-10 09:56:46 -03:00
David Capello d51a6d4f51 [ci] New build-auto job to test the build.sh script
This runs only when the build.sh (or some misc/ script) is modified.
2025-04-10 09:21:06 -03:00
David Capello 2c9eb2a801 New misc/skia-url.sh script to simplify downloading the required Skia branch 2025-04-10 09:08:06 -03:00
David Capello bae8520580 Update modules due cmake_minimum_required() issues (#5087, #5071) 2025-04-02 21:44:03 -03:00
David Capello 7167969963 [theme] Fix horizontal separator alignment 2025-04-02 09:32:34 -03:00
David Capello 537ccd393f Prevent polling keyboard state for each created ui::Message
Getting the keyboard state to fill the keyboard modifiers can be
expensive (mainly on Windows calling GetAsyncKeyState). So we can lazy
evaluate the modifiers when they are needed.
2025-04-02 08:00:11 -03:00
Christian Kaiser b130601716
Startup optimizations (#5090)
* Delay DitheringSelector startup
* Delay setting the drag target
* Delay & enqueue menu reloading
2025-04-02 07:59:52 -03:00
David Capello 816be744ac Add Widget::textBaseline() to fix several misalignments using scalable fonts
* 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.
2025-03-27 18:22:51 -03:00
David Capello 50bccf85fc Add support to scale sprite sheet fonts
We've highlighted (with an "*") the sprite sheet font size, so it's
easy to select its default size.
2025-03-24 23:19:30 -03:00
David Capello 2ee4819bf9 Show link to go to the Themes section to customize the font for certain languages 2025-03-14 16:02:31 -03:00
David Capello 805d98e943 Fix font rendering issues in non-English languages (fix #4804)
Graphics::measureText() wasn't shaping text correctly using the
FontMgr to get more fonts when they were required. And now
SkinTheme::drawText() can use Widget::textSize() (the cached size of
the widget text blob) to calculate the required text size.
2025-03-13 16:20:11 -03:00
Martín Capello c68b4923f8 Prevent using an invalid drawing point (fix #5055) 2025-03-12 15:47:23 -03:00
David Capello 53c415c933 Fix entry height in ColorSliders when UI Scaling > 100% 2025-03-10 10:02:14 -03:00
David Capello d3265a1711 Fix UI vs Screen Scaling bugs w/window buttons and button sets/grids (fix #5043)
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%
2025-03-09 22:01:55 -03:00
David Capello c949f4a5a6 Centralize defined fonts in new app::Fonts class 2025-03-04 13:54:15 -03:00
David Capello 2706d2d75a Move font related types to src/app/fonts 2025-03-03 22:36:11 -03:00
David Capello ce989684d0 Don't save custom theme fonts when we uncheck these options 2025-03-03 21:48:47 -03:00
David Capello da5909639b Use the new Surface::applyScale() 2025-03-03 16:42:03 -03:00
David Capello fc63532fef Ignore .vscode directory 2025-03-03 11:24:52 -03:00
David Capello be6d2251aa Merge branch 'main' into beta 2025-02-26 10:26:09 -03:00
David Capello 9378f44191 Show warning when raw cel format for .aseprite files is selected (#4901, #4951) 2025-02-26 10:22:36 -03:00
David Capello f7f93c64f2 [lua] Update scripting API version to 32 2025-02-26 09:38:31 -03:00
David Capello 28d31a0b41 Change background color of read-only ui::Entry fields 2025-02-26 09:13:38 -03:00
David Capello 1e96c4640f Fix indentation of layer UUID in Aseprite file format spec 2025-02-26 08:36:35 -03:00
Gaspar Capello e4b3981ca6 Fix when Slices are set to a semi-transparent color they become opaque as we draw. 2025-02-25 15:10:41 -03:00
Liebranca ed56011a0f Fix set_sat() blend function 2025-02-25 10:22:48 -03:00
lightovernight ad765723c9 Fix Straight line via SHIFT + Tiled mode starts at wrong position 2025-02-25 09:46:31 -03:00
Gaspar Capello 63f918cf2a Fix onionskin visiblity is not updated if cel is empty (fix #4969) 2025-02-24 22:11:15 -03:00
Gaspar Capello e17c3400fb Fix "Straight Line from Last Point” bug in Tilemaps (fix #4623)
Prior to this fix, when the following conditions were met:
- On a tilemap layer
- Tilemap mode = OFF
- Tool = Pencil
- Tileset mode = Manual
- Modifying an existing tile with the "quick line"
  (i.e. holding down the SHIFT key)
resulted in incorrect tool behavior.
2025-02-24 21:56:36 -03:00
Martín Capello fa3fd501e0 Read and write layer's uuid as last element 2025-02-24 16:36:39 -03:00
Martín Capello 6580580e4e Replace <iostream> by <iosfwd> 2025-02-24 15:14:20 -03:00
Martín Capello 7454ec2d06 Rename m_useUuidsForLayers by m_uuidsForLayers 2025-02-24 15:14:14 -03:00
Martín Capello 9e69df53d1 Add assert when setting a layer's UUID 2025-02-24 14:58:28 -03:00
Martín Capello efc2a308b2 Fix includes order 2025-02-24 11:27:05 -03:00
Martín Capello dd644865cb Fix m_uuid field's comment 2025-02-24 11:23:39 -03:00
Martín Capello 7a03e45475 Generate UUIDs for Layers lazily 2025-02-24 11:12:54 -03:00
Martín Capello d398bd7a2a Replace "" by std::string() 2025-02-24 10:48:55 -03:00
Martín Capello 2071e465a1 Replace label by entry to show the layer's UUID 2025-02-24 10:47:24 -03:00
Martín Capello 7ced9af5d1 Reword some "UUIDs for layers" related text 2025-02-24 10:47:17 -03:00
Martín Capello c3cfae666b Add io part for layers UUIDs 2025-02-24 10:14:33 -03:00
Martín Capello 86ad09291f Add UUIDs to layers 2025-02-24 10:10:28 -03:00
David Capello 5739bfe287 Fix crash canceling "Apply" filter and then using "OK"
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.
2025-02-20 12:23:31 -03:00