nex_shift/src-tauri
mula.liu 680b4f159e fix(pin): give a pinned image a working enlarge control
Reported: "钉在屏幕上的图片放大按钮无效." There was no enlarge button to
be ineffective — the pin window shipped exactly two actions, copy and
close, so the third press a user went looking for did not exist.

One button now covers both directions: fill the screen, or return to the
size the image was pinned at. An enlarged pin that cannot be shrunk back
is no longer usable as a reference, and a second control for that would
spend hover space on the less common half of the gesture.

Sizing and placement are the whole feature, and both are pinned by tests
because each is correct on the machine that builds it and wrong elsewhere:

- the bound is the monitor's work area, not its size, or the window grows
  under the menu bar and a borderless window cannot be dragged back onto
  itself;
- `set_size` is told in logical pixels and `set_position` in physical
  ones, which on a 2x display is the difference between filling the screen
  and filling it twice from the wrong corner;
- size is set before position, because on a mixed-DPI desktop resizing can
  move a window onto another monitor and change its own scale factor;
- growth is capped at 3x, since the preview is already capped at 1040 px
  and past that the button delivers mosaic, not detail;
- the window grows from its centre and is clamped inside the work area, so
  a pin parked against a screen edge grows inward rather than off.

A fresh pin always opens at the small size. The window is reused rather
than rebuilt, so without that a user who enlarged once would find every
later pin arriving full-screen and soft.

Co-Authored-By: Codex <noreply@openai.com>
2026-11-19 17:49:30 +08:00
..
binaries release: prepare Shift 0.1.8 2026-10-27 18:45:32 +08:00
capabilities release: 0.1.1 — update channel, settings/UI trims, macOS + Windows x64 only 2026-10-26 03:06:46 +08:00
icons fix(tray): let the system draw a black/white mark, not the colour wheel 2026-11-19 17:45:07 +08:00
src fix(pin): give a pinned image a working enlarge control 2026-11-19 17:49:30 +08:00
Cargo.lock fix(drop): 拒绝改由光标表达,不再往按钮上叠禁止图标 2026-11-07 12:43:06 +08:00
Cargo.toml fix(drop): 拒绝改由光标表达,不再往按钮上叠禁止图标 2026-11-07 12:43:06 +08:00
Info.plist fix(share): declare the local network usage description 2026-10-26 18:54:25 +08:00
build.rs release: 0.1.1 — update channel, settings/UI trims, macOS + Windows x64 only 2026-10-26 03:06:46 +08:00
tauri.conf.json release: prepare Shift 0.1.11 2026-11-06 23:14:57 +08:00
tauri.macos.conf.json baseline: capture workspace state (bug fixes in progress) 2026-10-21 08:54:54 +08:00