fix: PDF finger ink, chrome UX, OneNote pens, and pen physics
Some checks failed
CI / Windows build (push) Has been cancelled

Wire finger drawing on PDF without breaking pinch; auto-hide page scrubber and fix bounce; share sticky tools with resize and per-page remember; side-button select; separate pen slots with colors; rnote pressure shapes plus tip-velocity width and lower stroke latency.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-06 16:01:01 +08:00
parent 85af037b7d
commit f31dd0fb52
17 changed files with 835 additions and 234 deletions

View File

@@ -465,17 +465,18 @@ class _PenSlideScreenState extends State<PenSlideScreen> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
BrushPickerButton(
selected: _penBrush,
active: _tool == EditorToolKind.brush,
tooltip: 'Brush',
labelFor: brushLabelEn,
colorFor: (b) => _brushColors[b] ?? Colors.black,
onSelected: (b) => setState(() {
_penBrush = b;
_tool = EditorToolKind.brush;
}),
),
// OneNote-style: each pen is its own slot with remembered color.
for (final b in kPenToolBrushes)
PenSlotButton(
kind: b,
selected: _tool == EditorToolKind.brush && _penBrush == b,
color: _brushColors[b] ?? Colors.black,
tooltip: brushLabelEn(b),
onPressed: () => setState(() {
_penBrush = b;
_tool = EditorToolKind.brush;
}),
),
ToolButton(
icon: Icons.brush_outlined,
selected: _tool == EditorToolKind.highlighter,
@@ -604,8 +605,16 @@ class _PenSlideScreenState extends State<PenSlideScreen> {
divisions: _slideCount > 1 ? _slideCount - 1 : null,
onChanged: (v) => setState(() => _scrub = v),
onChangeEnd: (v) {
setState(() => _scrub = null);
_goToSlide(v.round() - 1);
final target = v.round() - 1;
setState(() {
_scrub = v;
_slideIndex = target;
});
_goToSlide(target);
setState(() {
_scrub = null;
_showSlider = false;
});
},
),
),