Skip to content

ProCraft for Android: An Android native painting app written in Rust

Rust

fix(ui): broader arrows for the small Fit to Canvas icon

Joshaf00501e87d5
diff --git a/apps/procraft-android/android/app/src/main/java/io/github/artcraftandroid/procraft/ui/Icons.kt b/apps/procraft-android/android/app/src/main/java/io/github/artcraftandroid/procraft/ui/Icons.kt
index eec9cfd..717f7b2 100644
--- a/apps/procraft-android/android/app/src/main/java/io/github/artcraftandroid/procraft/ui/Icons.kt
+++ b/apps/procraft-android/android/app/src/main/java/io/github/artcraftandroid/procraft/ui/Icons.kt
@@ -546,7 +546,7 @@ object PcIcons {
val FlipHorizontal by lazy { ours("fliphorizontal", 50f, "M23.1 17.66L23.06 17.55L22.94 17.36L22.75 17.23L22.53 17.17L22.3 17.21L22.2 17.26L22.1 17.33L21.97 17.52L14.93 32.25L14.87 32.48L14.91 32.72L15.04 32.92L15.23 33.06L15.47 33.11L22.51 33.11L22.74 33.06L22.84 33L23.01 32.84L23.06 32.74L23.11 32.51ZM26.91 17.33L26.81 17.26L26.6 17.18L26.48 17.17L26.26 17.23L26.07 17.36L26 17.45L25.91 17.66L25.9 17.77L25.9 32.51L25.95 32.74L26 32.84L26.17 33L26.27 33.06L26.5 33.11L33.54 33.11L33.78 33.06L33.97 32.92L34.1 32.72L34.14 32.48L34.08 32.25L27.04 17.52ZM27.9 31.11L27.9 23.94L31.32 31.11Z") }
val FlipVertical by lazy { ours("flipvertical", 50f, "M31.86 23.65L31.97 23.62L32.17 23.49L32.31 23.29L32.35 23.18L32.36 23.06L32.32 22.82L32.2 22.62L32.01 22.48L16.63 15.13L16.39 15.07L16.14 15.11L15.93 15.24L15.79 15.45L15.74 15.69L15.74 23.04L15.78 23.28L15.84 23.39L16.02 23.56L16.12 23.62L16.36 23.67ZM32.2 27.63L32.32 27.43L32.35 27.31L32.36 27.19L32.31 26.96L32.17 26.76L32.08 26.69L31.97 26.63L31.74 26.58L16.36 26.58L16.12 26.63L16.02 26.69L15.84 26.86L15.78 26.97L15.74 27.21L15.74 34.56L15.79 34.8L15.93 35.01L16.14 35.14L16.39 35.18L16.63 35.12L32.01 27.77ZM17.82 28.67L25.3 28.67L17.82 32.24Z") }
val Rotate45 by lazy { ours("rotate45", 44f, "M15.97 20.69L16.48 19.92L17.1 19.24L17.79 18.63L18.3 18.29L18.83 17.99L19.68 17.63L20.57 17.39L21.48 17.26L22.4 17.26L23.01 17.33L23.61 17.45L24.2 17.62L24.77 17.85L25.32 18.12L25.84 18.44L26.33 18.81L26.79 19.22L27.4 19.9L26.52 20.59L26.41 20.72L26.36 20.87L26.37 21.03L26.43 21.18L26.55 21.29L26.71 21.35L30.01 21.92L30.19 21.91L30.41 21.77L30.51 21.53L30.76 18.1L30.66 17.88L30.54 17.77L30.38 17.73L30.14 17.77L28.3 19.2L29.18 18.48L28.39 17.61L27.75 17.03L26.8 16.35L26.08 15.95L25.34 15.62L24.91 15.46L24.13 15.23L23.33 15.08L22.57 14.99L21.75 14.97L20.94 15.03L20.49 15.09L19.74 15.24L18.96 15.47L18.53 15.63L17.83 15.95L17.12 16.34L16.74 16.59L16.12 17.05L15.52 17.6L14.96 18.19L14.67 18.55L14.2 19.22L13.8 19.92L13.45 20.66L13.26 21.23L13.26 21.58L13.37 21.92L13.58 22.21L13.71 22.33L14.03 22.49L14.21 22.53L14.56 22.53L14.9 22.42L15.05 22.33L15.3 22.07L15.4 21.92L15.69 21.23ZM26.2 24.58L26.27 24.45L26.33 24.16L26.27 23.87L26.1 23.63L22.49 20.01L22.24 19.84L21.95 19.79L21.66 19.84L21.41 20.01L17.8 23.63L17.63 23.87L17.57 24.16L17.63 24.45L17.8 24.7L21.41 28.31L21.66 28.48L21.95 28.54L22.24 28.48L22.49 28.31Z") }
- val FitToCanvas by lazy { ours("fittocanvas", 44f, "M14.71 14.54L14.6 14.63L14.56 14.73L14.55 14.83L15.26 18.55L15.33 18.69L15.47 18.76L15.57 18.76L15.66 18.72L16.59 17.8L19.26 20.45L19.5 20.56L19.84 20.59L20.17 20.49L20.37 20.34L20.53 20.13L20.63 19.8L20.59 19.46L20.48 19.23L17.84 16.56L18.76 15.63L18.8 15.53L18.8 15.43L18.72 15.3L18.59 15.22L14.86 14.52ZM29.5 14.68L29.44 14.59L29.36 14.54L29.21 14.52L25.48 15.22L25.35 15.3L25.27 15.43L25.27 15.53L25.31 15.63L26.23 16.56L23.59 19.23L23.48 19.46L23.44 19.8L23.54 20.13L23.7 20.34L23.9 20.49L24.23 20.59L24.57 20.56L24.81 20.45L27.48 17.8L28.41 18.72L28.5 18.76L28.6 18.76L28.74 18.69L28.81 18.55L29.52 14.83ZM20.43 24.84L20.56 24.62L20.63 24.37L20.61 24.11L20.53 23.87L20.37 23.66L20.17 23.51L19.92 23.42L19.67 23.41L19.34 23.51L19.13 23.66L16.59 26.2L15.66 25.28L15.52 25.23L15.37 25.28L15.3 25.35L15.26 25.45L14.55 29.17L14.56 29.27L14.6 29.37L14.71 29.46L14.86 29.48L18.59 28.78L18.68 28.74L18.76 28.66L18.8 28.57L18.8 28.47L18.76 28.37L17.84 27.44ZM24.88 23.6L24.65 23.47L24.4 23.41L24.15 23.42L23.9 23.51L23.7 23.66L23.54 23.87L23.46 24.11L23.44 24.37L23.54 24.7L23.7 24.9L26.23 27.44L25.31 28.37L25.27 28.52L25.31 28.66L25.39 28.74L25.48 28.78L29.21 29.48L29.31 29.48L29.4 29.44L29.5 29.32L29.52 29.17L28.81 25.45L28.77 25.35L28.7 25.28L28.6 25.24L28.5 25.24L28.41 25.28L27.48 26.2Z") }
+ val FitToCanvas by lazy { ours("fittocanvas", 44f, "M14.75 14.54L14.64 14.61L14.58 14.71L14.55 14.89L15.29 19.29L15.37 19.45L15.54 19.55L15.66 19.55L15.78 19.5L16.75 18.54L19.04 20.82L19.34 21.04L19.69 21.17L20.07 21.19L20.32 21.14L20.55 21.04L20.85 20.82L21.08 20.52L21.18 20.28L21.23 20.04L21.21 19.66L21.08 19.3L20.85 19L18.57 16.72L19.53 15.75L19.58 15.63L19.58 15.5L19.49 15.34L19.32 15.25L14.92 14.52ZM29.49 14.71L29.43 14.61L29.32 14.54L29.15 14.52L24.75 15.25L24.58 15.34L24.49 15.5L24.49 15.63L24.54 15.75L25.5 16.72L23.22 19L22.99 19.3L22.86 19.66L22.84 20.04L22.94 20.4L23.06 20.62L23.22 20.82L23.52 21.04L23.75 21.14L24 21.19L24.38 21.17L24.73 21.04L25.03 20.82L27.32 18.54L28.29 19.5L28.41 19.55L28.53 19.55L28.7 19.45L28.78 19.29L29.52 14.89ZM20.94 24.91L21.13 24.58L21.23 24.22L21.23 23.96L21.13 23.6L20.94 23.27L20.66 23.02L20.32 22.86L20.07 22.81L19.82 22.81L19.57 22.86L19.34 22.96L19.13 23.1L16.75 25.46L15.78 24.5L15.6 24.45L15.42 24.5L15.33 24.6L15.29 24.71L14.55 29.11L14.56 29.23L14.61 29.34L14.75 29.46L14.92 29.48L19.32 28.75L19.44 28.7L19.53 28.61L19.58 28.5L19.58 28.37L19.53 28.25L18.57 27.28ZM24.94 23.1L24.62 22.9L24.25 22.81L24 22.81L23.63 22.9L23.31 23.1L23.06 23.38L22.89 23.72L22.84 23.96L22.84 24.22L22.89 24.46L22.99 24.7L23.13 24.91L25.5 27.28L24.54 28.25L24.48 28.43L24.54 28.61L24.63 28.7L24.75 28.75L29.15 29.48L29.27 29.48L29.38 29.43L29.49 29.29L29.52 29.11L28.78 24.71L28.74 24.6L28.65 24.5L28.53 24.45L28.41 24.45L28.29 24.5L27.32 25.46Z") }
val Interpolation by lazy { ours("interpolation", 44f, "M20.83 12.39L20.77 12.28L20.59 12.09L20.35 11.99L20.22 11.98L12.67 11.98L12.41 12.03L12.2 12.18L12.05 12.39L12 12.65L12 20.2L12.05 20.45L12.2 20.67L12.41 20.81L12.67 20.86L20.22 20.86L20.47 20.81L20.69 20.67L20.83 20.45L20.88 20.2L20.88 12.65ZM31.9 15.56L31.65 14.72L31.24 13.95L30.69 13.28L30.02 12.73L29.25 12.32L28.41 12.07L27.55 11.98L26.68 12.07L25.85 12.32L25.08 12.73L24.41 13.28L23.85 13.95L23.44 14.72L23.19 15.56L23.11 16.42L23.19 17.29L23.44 18.12L23.85 18.89L24.41 19.56L25.08 20.12L25.85 20.53L26.68 20.78L27.55 20.86L28.41 20.78L29.25 20.53L30.02 20.12L30.69 19.56L31.24 18.89L31.65 18.12L31.9 17.29L31.99 16.42ZM20.83 23.5L20.77 23.38L20.59 23.2L20.35 23.1L20.22 23.09L12.67 23.09L12.41 23.14L12.2 23.28L12.05 23.5L12 23.75L12 31.3L12.05 31.56L12.2 31.77L12.41 31.92L12.67 31.97L20.22 31.97L20.47 31.92L20.69 31.77L20.83 31.56L20.88 31.3L20.88 23.75ZM31.94 23.5L31.88 23.38L31.69 23.2L31.58 23.14L31.32 23.09L23.77 23.09L23.52 23.14L23.3 23.28L23.16 23.5L23.11 23.75L23.11 31.3L23.16 31.56L23.3 31.77L23.52 31.92L23.77 31.97L31.32 31.97L31.58 31.92L31.79 31.77L31.94 31.56L31.99 31.3L31.99 23.75Z") }
val AdvancedMesh by lazy { icon("advanced-mesh", Part(MESH_CELLS, 0.6f, true)) }
diff --git a/assets/icons/procraft/fittocanvas.svg b/assets/icons/procraft/fittocanvas.svg
index 75a3009..048fc44 100644
--- a/assets/icons/procraft/fittocanvas.svg
+++ b/assets/icons/procraft/fittocanvas.svg
@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<!-- ProCraft fittocanvas icon: original, drawn by tools/icons/draw_icons.py. MIT OR Apache-2.0. -->
- <path fill="currentColor" fill-rule="evenodd" d="M3.66 3.5L3.53 3.61L3.48 3.72L3.48 3.83L4.28 8.07L4.37 8.23L4.52 8.31L4.64 8.31L4.75 8.27L5.8 7.22L8.84 10.23L9.11 10.36L9.5 10.4L9.87 10.28L10.11 10.11L10.28 9.87L10.4 9.5L10.36 9.11L10.23 8.84L7.22 5.8L8.27 4.75L8.31 4.64L8.31 4.52L8.23 4.37L8.07 4.28L3.83 3.48ZM20.5 3.66L20.44 3.56L20.34 3.5L20.17 3.48L15.93 4.28L15.77 4.37L15.69 4.52L15.69 4.64L15.73 4.75L16.78 5.8L13.77 8.84L13.64 9.11L13.6 9.5L13.72 9.87L13.89 10.11L14.13 10.28L14.5 10.4L14.89 10.36L15.16 10.23L18.2 7.22L19.25 8.27L19.36 8.31L19.48 8.31L19.63 8.23L19.72 8.07L20.52 3.83ZM10.17 15.23L10.32 14.98L10.4 14.7L10.38 14.4L10.28 14.13L10.11 13.89L9.87 13.72L9.6 13.62L9.3 13.6L8.93 13.72L8.69 13.89L5.8 16.78L4.75 15.73L4.58 15.68L4.41 15.73L4.33 15.82L4.28 15.93L3.48 20.17L3.48 20.28L3.53 20.39L3.66 20.5L3.83 20.52L8.07 19.72L8.18 19.67L8.27 19.59L8.31 19.48L8.31 19.36L8.27 19.25L7.22 18.2ZM15.23 13.83L14.98 13.68L14.7 13.6L14.4 13.62L14.13 13.72L13.89 13.89L13.72 14.13L13.62 14.4L13.6 14.7L13.72 15.07L13.89 15.31L16.78 18.2L15.73 19.25L15.68 19.42L15.73 19.59L15.82 19.67L15.93 19.72L20.17 20.52L20.28 20.52L20.39 20.47L20.5 20.34L20.52 20.17L19.72 15.93L19.67 15.82L19.59 15.73L19.48 15.69L19.36 15.69L19.25 15.73L18.2 16.78Z"/>
+ <path fill="currentColor" fill-rule="evenodd" d="M2.93 2.72L2.8 2.8L2.72 2.93L2.69 3.15L3.6 8.62L3.71 8.83L3.91 8.95L4.07 8.95L4.22 8.89L5.43 7.69L8.27 10.53L8.65 10.81L9.09 10.97L9.56 10.99L9.86 10.93L10.15 10.81L10.53 10.53L10.81 10.15L10.93 9.86L10.99 9.56L10.97 9.09L10.81 8.65L10.53 8.27L7.69 5.43L8.89 4.22L8.95 4.07L8.95 3.91L8.83 3.71L8.62 3.6L3.15 2.69ZM21.28 2.93L21.2 2.8L21.07 2.72L20.85 2.69L15.38 3.6L15.17 3.71L15.05 3.91L15.05 4.07L15.11 4.22L16.31 5.43L13.47 8.27L13.19 8.65L13.03 9.09L13.01 9.56L13.12 10.01L13.27 10.29L13.47 10.53L13.85 10.81L14.14 10.93L14.44 10.99L14.91 10.97L15.35 10.81L15.73 10.53L18.57 7.69L19.78 8.89L19.93 8.95L20.09 8.95L20.29 8.83L20.4 8.62L21.31 3.15ZM10.64 15.62L10.88 15.21L10.99 14.76L10.99 14.44L10.88 13.99L10.64 13.58L10.29 13.27L9.86 13.07L9.56 13.01L9.24 13.01L8.94 13.07L8.65 13.19L8.38 13.36L5.43 16.31L4.22 15.11L3.99 15.04L3.77 15.12L3.66 15.23L3.6 15.38L2.69 20.85L2.7 21L2.76 21.14L2.93 21.28L3.15 21.31L8.62 20.4L8.77 20.34L8.88 20.23L8.95 20.09L8.95 19.93L8.89 19.78L7.69 18.57ZM15.62 13.36L15.21 13.12L14.76 13.01L14.44 13.01L13.99 13.12L13.58 13.36L13.27 13.71L13.07 14.14L13.01 14.44L13.01 14.76L13.07 15.06L13.19 15.35L13.36 15.62L16.31 18.57L15.11 19.78L15.04 20.01L15.12 20.23L15.23 20.34L15.38 20.4L20.85 21.31L21 21.3L21.14 21.24L21.28 21.07L21.31 20.85L20.4 15.38L20.34 15.23L20.23 15.12L20.09 15.05L19.93 15.05L19.78 15.11L18.57 16.31Z"/>
</svg>
diff --git a/tools/icons/draw_icons.py b/tools/icons/draw_icons.py
index df3ba85..38aa4ff 100644
--- a/tools/icons/draw_icons.py
+++ b/tools/icons/draw_icons.py
@@ -354,15 +354,16 @@ def rotate_step():
def fit_to_canvas():
- """Fit to canvas: four arrows pointing out to the corners."""
+ """Fit to canvas: four broad arrows pointing out to the corners (the slot is small, so they're
+ heavier than the guide's line weight)."""
arrows = []
for dx, dy in ((1, 1), (-1, 1), (1, -1), (-1, -1)):
a = (12 + dx * 2.6, 12 + dy * 2.6)
- b = (12 + dx * 8.6, 12 + dy * 8.6)
+ b = (12 + dx * 9.4, 12 + dy * 9.4)
ux, uy = dx * SQ2, dy * SQ2
px, py = -uy, ux
- head = soft(Polygon([b, (b[0] - ux * 4.4 + px * 3.0, b[1] - uy * 4.4 + py * 3.0), (b[0] - ux * 4.4 - px * 3.0, b[1] - uy * 4.4 - py * 3.0)]), 0.3)
- arrows += [capsule(a, (b[0] - ux * 2.5, b[1] - uy * 2.5), 1.0), head]
+ head = soft(Polygon([b, (b[0] - ux * 5.6 + px * 4.0, b[1] - uy * 5.6 + py * 4.0), (b[0] - ux * 5.6 - px * 4.0, b[1] - uy * 5.6 - py * 4.0)]), 0.4)
+ arrows += [capsule(a, (b[0] - ux * 4.0, b[1] - uy * 4.0), 1.6), head]
return unary_union(arrows)