diff --git a/app/lib/views/edit.dart b/app/lib/views/edit.dart index 96f6e47db044..97b8a55c4f23 100644 --- a/app/lib/views/edit.dart +++ b/app/lib/views/edit.dart @@ -192,6 +192,8 @@ class _EditToolbarState extends State { physics: const NeverScrollableScrollPhysics(), crossAxisCount: settings.toolbarRows, childAspectRatio: 1, + itemDragEnable: (index) => index != tools.length, + buildDefaultDragHandles: false, children: List.generate( tools.length + 1, (i) { @@ -247,34 +249,23 @@ class _EditToolbarState extends State { ), ), ); - return GestureDetector( - onLongPress: () {}, - onLongPressStart: (_) {}, - onLongPressMoveUpdate: (_) {}, - onLongPressEnd: (_) {}, - onLongPressUp: () {}, - onLongPressDown: (_) {}, - onLongPressCancel: () {}, - onScaleStart: (_) {}, - onScaleUpdate: (_) {}, - onScaleEnd: (_) {}, - key: const Key('add'), - child: direction == Axis.horizontal - ? Row( - mainAxisSize: MainAxisSize.min, - children: [ - const VerticalDivider(), - Expanded(child: add), - ], - ) - : Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Divider(), - Expanded(child: add), - ], - ), - ); + return direction == Axis.horizontal + ? Row( + mainAxisSize: MainAxisSize.min, + key: const Key('add-row'), + children: [ + const VerticalDivider(), + Expanded(child: add), + ], + ) + : Column( + mainAxisSize: MainAxisSize.min, + key: const Key('add-column'), + children: [ + const Divider(), + Expanded(child: add), + ], + ); } var e = tools[i]; final selected = i == currentIndex.index; @@ -353,7 +344,7 @@ class _EditToolbarState extends State { .changeSelection(e, true); } })); - return ReorderableDelayedDragStartListener( + return ReorderableGridDelayedDragStartListener( index: i, key: ObjectKey(i), enabled: selected || highlighted, diff --git a/app/pubspec.lock b/app/pubspec.lock index c0cc2048904f..8d4fdedc8cbe 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -418,10 +418,10 @@ packages: dependency: transitive description: name: file_selector_android - sha256: "934850f9702b0f9031bc331a306e7bebc62f894a6e5ca6c0681c7af17e7afb50" + sha256: "98ac58e878b05ea2fdb204e7f4fc4978d90406c9881874f901428e01d3b18fbc" url: "https://pub.dev" source: hosted - version: "0.5.1+11" + version: "0.5.1+12" file_selector_ios: dependency: transitive description: @@ -1164,11 +1164,12 @@ packages: reorderable_grid: dependency: "direct main" description: - name: reorderable_grid - sha256: "0b9cd95ef0f070ef99f92affe9cf85a4aa127099cd1334e5940950ce58cd981d" - url: "https://pub.dev" - source: hosted - version: "1.0.10" + path: "." + ref: d6f6a4fcf23129400529a055292133f1030b7eee + resolved-ref: d6f6a4fcf23129400529a055292133f1030b7eee + url: "https://github.com/CodeDoctorDE/reorderable_grid.git" + source: git + version: "1.0.9" replay_bloc: dependency: "direct main" description: diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 85d2a341926b..09cf37471d2c 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -61,7 +61,10 @@ dependencies: connectivity_plus: ^6.0.3 cross_file: ^0.3.4+1 args: ^2.5.0 - reorderable_grid: ^1.0.10 + reorderable_grid: + git: + url: https://github.com/CodeDoctorDE/reorderable_grid.git + ref: d6f6a4fcf23129400529a055292133f1030b7eee perfect_freehand: git: url: https://github.com/CodeDoctorDE/perfect-freehand-dart.git diff --git a/docs/package.json b/docs/package.json index bfcdc1e55638..3277d66a021e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -24,7 +24,7 @@ "sharp": "^0.33.5", "typescript": "^5.7.2" }, - "packageManager": "pnpm@9.14.2", + "packageManager": "pnpm@9.14.4", "devDependencies": { "sass": "^1.81.0" } diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 2a56b7824e65..055244efcab5 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -756,17 +756,17 @@ packages: cpu: [x64] os: [win32] - '@shikijs/core@1.23.1': - resolution: {integrity: sha512-NuOVgwcHgVC6jBVH5V7iblziw6iQbWWHrj5IlZI3Fqu2yx9awH7OIQkXIcsHsUmY19ckwSgUMgrqExEyP5A0TA==} + '@shikijs/core@1.24.0': + resolution: {integrity: sha512-6pvdH0KoahMzr6689yh0QJ3rCgF4j1XsXRHNEeEN6M4xJTfQ6QPWrmHzIddotg+xPJUPEPzYzYCKzpYyhTI6Gw==} - '@shikijs/engine-javascript@1.23.1': - resolution: {integrity: sha512-i/LdEwT5k3FVu07SiApRFwRcSJs5QM9+tod5vYCPig1Ywi8GR30zcujbxGQFJHwYD7A5BUqagi8o5KS+LEVgBg==} + '@shikijs/engine-javascript@1.24.0': + resolution: {integrity: sha512-ZA6sCeSsF3Mnlxxr+4wGEJ9Tto4RHmfIS7ox8KIAbH0MTVUkw3roHPHZN+LlJMOHJJOVupe6tvuAzRpN8qK1vA==} - '@shikijs/engine-oniguruma@1.23.1': - resolution: {integrity: sha512-KQ+lgeJJ5m2ISbUZudLR1qHeH3MnSs2mjFg7bnencgs5jDVPeJ2NVDJ3N5ZHbcTsOIh0qIueyAJnwg7lg7kwXQ==} + '@shikijs/engine-oniguruma@1.24.0': + resolution: {integrity: sha512-Eua0qNOL73Y82lGA4GF5P+G2+VXX9XnuUxkiUuwcxQPH4wom+tE39kZpBFXfUuwNYxHSkrSxpB1p4kyRW0moSg==} - '@shikijs/types@1.23.1': - resolution: {integrity: sha512-98A5hGyEhzzAgQh2dAeHKrWW4HfCMeoFER2z16p5eJ+vmPeF6lZ/elEne6/UCU551F/WqkopqRsr1l2Yu6+A0g==} + '@shikijs/types@1.24.0': + resolution: {integrity: sha512-aptbEuq1Pk88DMlCe+FzXNnBZ17LCiLIGWAeCWhoFDzia5Q5Krx3DgnULLiouSdd6+LUM39XwXGppqYE0Ghtug==} '@shikijs/vscode-textmate@9.3.0': resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} @@ -1114,8 +1114,8 @@ packages: resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} engines: {node: '>=4'} - electron-to-chromium@1.5.65: - resolution: {integrity: sha512-PWVzBjghx7/wop6n22vS2MLU8tKGd4Q91aCEGhG/TYmW6PP5OcSXcdnxTe1NNt0T66N8D6jxh4kC8UsdzOGaIw==} + electron-to-chromium@1.5.67: + resolution: {integrity: sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==} emmet@2.4.11: resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==} @@ -1708,8 +1708,8 @@ packages: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} - oniguruma-to-es@0.4.1: - resolution: {integrity: sha512-rNcEohFz095QKGRovP/yqPIKc+nP+Sjs4YTHMv33nMePGKrq/r2eu9Yh4646M5XluGJsUnmwoXuiXE69KDs+fQ==} + oniguruma-to-es@0.7.0: + resolution: {integrity: sha512-HRaRh09cE0gRS3+wi2zxekB+I5L8C/gN60S+vb11eADHUaB/q4u8wGGOX3GvwvitG8ixaeycZfeoyruKQzUgNg==} ora@8.1.1: resolution: {integrity: sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==} @@ -1976,8 +1976,8 @@ packages: resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - shiki@1.23.1: - resolution: {integrity: sha512-8kxV9TH4pXgdKGxNOkrSMydn1Xf6It8lsle0fiqxf7a1149K1WGtdOu3Zb91T5r1JpvRPxqxU3C2XdZZXQnrig==} + shiki@1.24.0: + resolution: {integrity: sha512-qIneep7QRwxRd5oiHb8jaRzH15V/S8F3saCXOdjwRLgozZJr5x2yeBhQtqkO3FSzQDwYEFAYuifg4oHjpDghrg==} signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} @@ -2443,7 +2443,7 @@ snapshots: remark-parse: 11.0.0 remark-rehype: 11.1.1 remark-smartypants: 3.0.2 - shiki: 1.23.1 + shiki: 1.24.0 unified: 11.0.5 unist-util-remove-position: 5.0.0 unist-util-visit: 5.0.0 @@ -2799,7 +2799,7 @@ snapshots: '@expressive-code/plugin-shiki@0.38.3': dependencies: '@expressive-code/core': 0.38.3 - shiki: 1.23.1 + shiki: 1.24.0 '@expressive-code/plugin-text-markers@0.38.3': dependencies: @@ -3092,27 +3092,27 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.27.4': optional: true - '@shikijs/core@1.23.1': + '@shikijs/core@1.24.0': dependencies: - '@shikijs/engine-javascript': 1.23.1 - '@shikijs/engine-oniguruma': 1.23.1 - '@shikijs/types': 1.23.1 + '@shikijs/engine-javascript': 1.24.0 + '@shikijs/engine-oniguruma': 1.24.0 + '@shikijs/types': 1.24.0 '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 hast-util-to-html: 9.0.3 - '@shikijs/engine-javascript@1.23.1': + '@shikijs/engine-javascript@1.24.0': dependencies: - '@shikijs/types': 1.23.1 + '@shikijs/types': 1.24.0 '@shikijs/vscode-textmate': 9.3.0 - oniguruma-to-es: 0.4.1 + oniguruma-to-es: 0.7.0 - '@shikijs/engine-oniguruma@1.23.1': + '@shikijs/engine-oniguruma@1.24.0': dependencies: - '@shikijs/types': 1.23.1 + '@shikijs/types': 1.24.0 '@shikijs/vscode-textmate': 9.3.0 - '@shikijs/types@1.23.1': + '@shikijs/types@1.24.0': dependencies: '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 @@ -3353,7 +3353,7 @@ snapshots: prompts: 2.4.2 rehype: 13.0.2 semver: 7.6.3 - shiki: 1.23.1 + shiki: 1.24.0 tinyexec: 0.3.1 tsconfck: 3.1.4(typescript@5.7.2) unist-util-visit: 5.0.0 @@ -3415,7 +3415,7 @@ snapshots: browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001684 - electron-to-chromium: 1.5.65 + electron-to-chromium: 1.5.67 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -3528,7 +3528,7 @@ snapshots: dset@3.1.4: {} - electron-to-chromium@1.5.65: {} + electron-to-chromium@1.5.67: {} emmet@2.4.11: dependencies: @@ -4518,7 +4518,7 @@ snapshots: dependencies: mimic-function: 5.0.1 - oniguruma-to-es@0.4.1: + oniguruma-to-es@0.7.0: dependencies: emoji-regex-xs: 1.0.0 regex: 5.0.2 @@ -4924,12 +4924,12 @@ snapshots: '@img/sharp-win32-ia32': 0.33.5 '@img/sharp-win32-x64': 0.33.5 - shiki@1.23.1: + shiki@1.24.0: dependencies: - '@shikijs/core': 1.23.1 - '@shikijs/engine-javascript': 1.23.1 - '@shikijs/engine-oniguruma': 1.23.1 - '@shikijs/types': 1.23.1 + '@shikijs/core': 1.24.0 + '@shikijs/engine-javascript': 1.24.0 + '@shikijs/engine-oniguruma': 1.24.0 + '@shikijs/types': 1.24.0 '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 diff --git a/metadata/en-US/changelogs/123.txt b/metadata/en-US/changelogs/123.txt index e4818fe2c247..0437a01c68b9 100644 --- a/metadata/en-US/changelogs/123.txt +++ b/metadata/en-US/changelogs/123.txt @@ -2,6 +2,7 @@ * Add save button indicator for autosave ([#757](https://github.com/LinwoodDev/Butterfly/issues/757)) * Add duplicate layer button * Add tool options panel position +* Use long press to move tools on all platforms to improve desktop touch behavior * Use sha checksum for assets * Separate personalization settings in new view settings * Fix webdav on windows diff --git a/tools/pubspec.lock b/tools/pubspec.lock index 39fd55439da3..cbc5b0934435 100644 --- a/tools/pubspec.lock +++ b/tools/pubspec.lock @@ -53,10 +53,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "99f282cb0e02edcbbf8c6b3bbc7c90b65635156c412e58f3975a7e55284ce685" + sha256: "00f33b908655e606b86d2ade4710a231b802eec6f11e87e4ea3783fd72077a50" url: "https://pub.dev" source: hosted - version: "0.20.0" + version: "0.20.1" lints: dependency: "direct main" description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.1.0" yaml: dependency: "direct main" description: