diff --git a/.gitignore b/.gitignore index 4604363..42f356f 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,7 @@ app.*.map.json *.deb *.tar.gz *.exe -!dist/imajviewer_1.7.1_amd64.deb +!dist/imajviewer_1.7.2_amd64.deb !dist/imajviewer_setup_1.1.0.exe deb/usr/lib/imajviewer/ release/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 83d8df9..06d19f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to imajViewer are documented in this file. ## [Unreleased] +## [1.7.2] - 2026-10-25 + +### Fixed +- Rotating sometimes vanished before saving: the right-button double-click reset was + detected on button *down* against the previous down time and position, so two rotate + drags started quickly at nearly the same spot were treated as a double click — all + effects (rotation included) were wiped and the second drag was ignored, so `Ctrl+S` + saved an unrotated crop. A double click is now only counted for actual clicks + (movement ≤ 4 px, decided on button up), a drag breaks the chain, and + `pointer up` is matched by pointer id so a left-drag pan never counts as a click. + ## [1.7.1] - 2026-10-25 ### Added diff --git a/dist/imajviewer_1.7.1_amd64.deb b/dist/imajviewer_1.7.2_amd64.deb similarity index 63% rename from dist/imajviewer_1.7.1_amd64.deb rename to dist/imajviewer_1.7.2_amd64.deb index f39ee32..71379b1 100644 Binary files a/dist/imajviewer_1.7.1_amd64.deb and b/dist/imajviewer_1.7.2_amd64.deb differ diff --git a/lib/screens/viewer_screen.dart b/lib/screens/viewer_screen.dart index bbb5db4..ecb7673 100644 --- a/lib/screens/viewer_screen.dart +++ b/lib/screens/viewer_screen.dart @@ -17,7 +17,7 @@ import '../shortcuts/app_shortcuts.dart'; import '../services/window_persistence.dart'; import '../l10n/app_localizations.dart'; -const appVersion = '1.7.1'; +const appVersion = '1.7.2'; class ViewerScreen extends StatefulWidget { final List initialFiles; diff --git a/lib/widgets/image_canvas.dart b/lib/widgets/image_canvas.dart index 650a835..45db678 100644 --- a/lib/widgets/image_canvas.dart +++ b/lib/widgets/image_canvas.dart @@ -41,6 +41,11 @@ class ImageCanvasState extends State { double _startBrightness = 0; DateTime? _lastRightTapTime; Offset _lastRightTapPos = Offset.zero; + /// Sağ tuş basılıyken anlamlı hareket oldu mu? (tıklama mı sürükleme mi) + bool _rightDragMoved = false; + int? _rightPointerId; + /// Sürükleme sayılma eşiği (px) — rotate/contrast ince ayarında el titremesi. + static const double _dragClickSlop = 4; // ── Klavye modifier tracking ── bool _ctrlPressed = false; @@ -311,23 +316,8 @@ class ImageCanvasState extends State { if (e.buttons != kSecondaryMouseButton) return; _pointerDownPos = e.localPosition; - - final now = DateTime.now(); - if (_lastRightTapTime != null && - now.difference(_lastRightTapTime!) < const Duration(milliseconds: 400) && - (e.localPosition - _lastRightTapPos).distance < 20) { - _angle = 0; - _contrast = 1.0; - _saturation = 1.0; - _brightness = 0; - _flipH = false; - _interactionMode = 'none'; - _markRenderDirty(); - _lastRightTapTime = null; - return; - } - _lastRightTapTime = now; - _lastRightTapPos = e.localPosition; + _rightDragMoved = false; + _rightPointerId = e.pointer; if (_ctrlPressed && _shiftPressed) { _interactionMode = 'brightness'; @@ -346,6 +336,10 @@ class ImageCanvasState extends State { void _onPointerMove(PointerMoveEvent e) { if (e.buttons != kSecondaryMouseButton) return; + if (!_rightDragMoved && + (e.localPosition - _pointerDownPos).distance > _dragClickSlop) { + _rightDragMoved = true; + } final dy = e.localPosition.dy - _pointerDownPos.dy; @@ -367,7 +361,30 @@ class ImageCanvasState extends State { } void _onPointerUp(PointerUpEvent e) { + if (e.pointer != _rightPointerId) return; + _rightPointerId = null; _interactionMode = 'none'; + // Sürükleme ile biten etkileşim sağ çift tık zincirini keser; yalnızca + // gerçek tıklamalar (hareketsiz bas-bırak) çift tık sayılır. + if (_rightDragMoved) { + _lastRightTapTime = null; + _rightDragMoved = false; + return; + } + final now = DateTime.now(); + final isDouble = _lastRightTapTime != null && + now.difference(_lastRightTapTime!) < const Duration(milliseconds: 400) && + (e.localPosition - _lastRightTapPos).distance < 20; + _lastRightTapTime = isDouble ? null : now; + _lastRightTapPos = e.localPosition; + if (isDouble) { + _angle = 0; + _contrast = 1.0; + _saturation = 1.0; + _brightness = 0; + _flipH = false; + _markRenderDirty(); + } } // ── Combined color filter (brightness × saturation × contrast) ── diff --git a/pubspec.yaml b/pubspec.yaml index d54a22d..77b2f9d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: imajviewer description: "Ultra-lightweight image viewer for Linux and Windows." publish_to: 'none' -version: 1.7.1+17 +version: 1.7.2+18 msix_config: display_name: ImajViewer