Commit Graph
2291 Commits
Author SHA1 Message Date
Denis Gomes a497b99078 M7: place images at their own size, in points for 2x screenshots
A placed image was always fitted into 1000 px on its longer side, so a
screenshot of a 1440 px wide page came in at 1000 px and stopped lining
up with the design it was taken from. Figma places an image at its pixel
size and only scales down a side past 4096 px.

Placing now does the same, and reads the screen density a PNG records:
macOS screenshots carry 144 dpi (pHYs), so an 800 x 600 px capture of a
400 x 300 pt area comes in at 400 x 300, as in Figma. Only whole 2x-4x
multiples of 72 dpi count as a screen density; 300 dpi print scans and
other values keep their pixel size. The image data stays at full
resolution, so exports at 2x and up stay sharp.

On macOS, pasting reads the clipboard's public.png as is instead of the
decoded pixels arboard returns, which drop the density (and the colour
profile). Other platforms keep the decoded image.

Files dropped, Place image, paste and image.place all go through the
same path; an explicit width/height still wins.
2026-10-27 01:38:19 -04:00
aiongg 43af145a12 Merge pull request #1394 from aiongg/layout
refactor: shared module layout (craft-contrib#20)
2026-10-26 21:30:55 -04:00
skylar taylor-barrick 695054520c Merge pull request #1395 from storytold/fix/nextest-0.9.150
ci: require nextest 0.9.150
2026-10-26 17:35:59 -06:00
aiongg 60c671da66 docs: update source paths for the layout moves 2026-10-26 20:36:51 +00:00
aiongg 52d89286cf refactor(collab-net): move hub test files to hub/ 2026-10-26 20:36:51 +00:00
aiongg c9d6b356fc refactor(format): move fig/map test files to fig/map/ 2026-10-26 20:36:51 +00:00
aiongg e1e5b4bbe3 refactor(ui-egui): move widgets/style_picker test files to widgets/style_picker/ 2026-10-26 20:36:51 +00:00
aiongg 990742c32e refactor(ui-egui): move present test files to present/ 2026-10-26 20:36:51 +00:00
aiongg aca3643b18 refactor(ui-egui): move control test files to control/ 2026-10-26 20:36:51 +00:00
aiongg 8f2f93cd0b refactor(ui-egui): move canvas test files to canvas/ 2026-10-26 20:36:51 +00:00
aiongg d436103fca refactor(ui-egui): move i18n test files to i18n/ 2026-10-26 20:36:51 +00:00
aiongg a1308e1c1a refactor(ui-egui): move dialogs/credits test files to dialogs/credits/ 2026-10-26 20:36:51 +00:00
aiongg 9ca6e1a82f refactor(ui-egui): move bidi test files to bidi/ 2026-10-26 20:36:51 +00:00
aiongg 0330a7cc85 refactor(engine): move assets/components test files to assets/components/ 2026-10-26 20:36:51 +00:00
aiongg 2576e646a1 refactor(engine): move sharing/background test files to sharing/background/ 2026-10-26 20:36:51 +00:00
aiongg 7d70e0bfe5 refactor(engine): move assets/library test files to assets/library/ 2026-10-26 20:36:51 +00:00
aiongg 9c97cb6e17 refactor(engine): move assets/library_server test files to assets/library_server/ 2026-10-26 20:36:51 +00:00
aiongg 32bd9dc35a refactor(engine): move fonts test files to fonts/ 2026-10-26 20:36:51 +00:00
aiongg 3398ec3c8c refactor(engine): move automation/file_access test files to automation/file_access/ 2026-10-26 20:36:50 +00:00
aiongg f664a82093 refactor(engine): move assets/library_swap test files to assets/library_swap/ 2026-10-26 20:36:50 +00:00
aiongg 3102bffc90 refactor(server): split store.rs into store/ 2026-10-26 20:36:50 +00:00
aiongg a7a35a8322 refactor(collab-net): split hub.rs into hub/ 2026-10-26 20:36:50 +00:00
aiongg 064e6be65f refactor(format): split fig/export.rs into export/ 2026-10-26 20:36:50 +00:00
aiongg 450675919f refactor(format): split fig/map.rs into map/ 2026-10-26 20:17:49 +00:00
aiongg 3b56a856be refactor(ui-egui): split app.rs into app/ 2026-10-26 20:17:49 +00:00
aiongg 5c29d184f4 refactor(ui-egui): split icons.rs into icons/ 2026-10-26 20:17:49 +00:00
aiongg 1d892d2e7b refactor(ui-egui): split panels/typography.rs into typography/ 2026-10-26 20:17:48 +00:00
aiongg f61032b3c9 refactor(ui-egui): split canvas.rs into canvas/ 2026-10-26 20:17:48 +00:00
aiongg 99edc6c815 refactor(ui-egui): split panels/right.rs into right/ 2026-10-26 20:17:48 +00:00
aiongg 6167d19e52 refactor(ui-egui): split present.rs into present/ 2026-10-26 20:17:48 +00:00
aiongg 2fded28028 refactor(ui-egui): split lib.rs into app.rs, services.rs, state.rs, clock.rs and open.rs 2026-10-26 20:17:48 +00:00
aiongg 65443020db refactor(ui-egui): split menus.rs into menus/ 2026-10-26 20:17:48 +00:00
aiongg d8de0fdea7 refactor(ui-egui): split dialogs.rs into dialogs/ 2026-10-26 20:17:48 +00:00
aiongg a9d93f8310 refactor(engine): split cmd/file.rs into file/ 2026-10-26 20:17:48 +00:00
aiongg 96423f5a6e refactor(engine): move cmd/file.rs zip_cap_tests to file/zip_cap_tests.rs 2026-10-26 20:17:48 +00:00
aiongg 13855cfabe refactor(engine): move cmd/file.rs staging_write_tests to file/staging_write_tests.rs 2026-10-26 20:17:48 +00:00
aiongg 47c807f209 refactor(engine): move cmd/file.rs rest_import_tests to file/rest_import_tests.rs 2026-10-26 20:17:48 +00:00
aiongg f0f1c2003d refactor(engine): move cmd/file.rs tab_order_tests to file/tab_order_tests.rs 2026-10-26 20:17:48 +00:00
aiongg 1e9e0a4e75 refactor(engine): split session.rs into session/ 2026-10-26 20:17:48 +00:00
aiongg c4bd0dd542 refactor(engine): move Session state, prefs, errors and methods out of lib.rs 2026-10-26 20:17:48 +00:00
aiongg 0b9fcb7f4e refactor(engine): split cmd/component.rs into component/ 2026-10-26 20:17:48 +00:00
aiongg cea90cf935 refactor(engine): split cmd/edit.rs into edit/ 2026-10-26 20:17:48 +00:00
aiongg 688eeccc7a refactor(engine): split boards/board.rs into board/ 2026-10-26 20:17:48 +00:00
aiongg ad4ba1ae9b refactor(engine): split dev/codegen.rs into codegen/ 2026-10-26 20:17:48 +00:00
aiongg c631450b0c refactor(engine): split sharing/live.rs into live/ 2026-10-26 20:17:48 +00:00
aiongg 0bc49705bd refactor(engine): split assets/components.rs into components/ 2026-10-26 20:17:48 +00:00
aiongg 2e7790b58b refactor(engine): split canvas/tools.rs into tools/ 2026-10-26 20:17:48 +00:00
aiongg 7d3978bedf refactor(ui-egui): move home_recents, online to home/ 2026-10-26 20:17:48 +00:00
aiongg 49ca56c3a4 refactor(ui-egui): move colorpicker, style_picker, field_math, font_preview, board_picker to widgets/ 2026-10-26 20:17:48 +00:00
aiongg 525d5cb6a1 refactor(ui-egui): move credits, missing_fonts, import_report, updates_ui, variables_panel, branch_ui, plugins_ui to dialogs/ 2026-10-26 20:17:48 +00:00