Skip to content

Make duplicated layers independent and expose watch customization modes - #105

Closed
krtkygpta wants to merge 1 commit into
fmctools:mainfrom
krtkygpta:main
Closed

krtkygpta wants to merge 1 commit into
fmctools:mainfrom
krtkygpta:main

Conversation

@krtkygpta

Copy link
Copy Markdown
Contributor

Problem

Duplicating or pasting a layer reused the original's image assets. Editing the duplicate's pixels, colors, or adjustments therefore changed the original too, and the same leak happened in the other direction.

There was also no editor control for the watchface capability byte at 0x17. Users needed an external patcher to choose whether the watch allows color customization, function customization, both, or neither.

Change

  • Duplicates, pastes, cuts, and imports now get fresh image IDs and private image data. The decoded-bitmap cache is remapped to the new IDs, so edits to one copy stay independent from the original.
  • The editor toolbar has a dropdown with the three requested customization modes:
    • No customization (0x08)
    • Accent color customization (0x0a)
    • Functions and color customization (0x0e)
  • The selected value is kept through renames and is written to the header byte and the footer mirror on export.

Testing

  • Updated the clipboard and duplicate tests to cover independent image data and fresh asset IDs.
  • Added a byte round-trip test for the customization mode, its rename preservation, and the footer mirror.
  • Ran pnpm check, pnpm lint, the relevant browser/unit tests, and pnpm build successfully. The full suite has one unrelated existing typography failure in avatar/icon components.

@freethinkel

Copy link
Copy Markdown
Collaborator

@krtkygpta there is conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants