Skip to content

Commit

Permalink
Pinch to zoom explanation + handle errors (#6186)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Jan 12, 2025
1 parent 00c844a commit 975ab43
Show file tree
Hide file tree
Showing 11 changed files with 229 additions and 22 deletions.
Binary file not shown.
Binary file modified packages/smooth_app/assets/fonts/SmoothIcons.ttf
Binary file not shown.
14 changes: 14 additions & 0 deletions packages/smooth_app/assets/fonts/icons/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,20 @@
"search": [
"milk_add"
]
},
{
"uid": "caeb08335376438b1112ce26394eed40",
"css": "pinch_to_zoom",
"code": 59521,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M965.7 0C964.5 0.1 963.2 0.2 962 0.3L799.8 0.3C787.8 0.2 776.6 6.5 770.6 16.9 764.5 27.2 764.5 40.1 770.6 50.4 776.6 60.8 787.8 67.1 799.8 67L886 67 758.3 194.6C731.1 176.6 699.2 166.9 666.6 166.9 574.6 166.9 500.1 241.4 500.1 333.4 500.1 425.4 574.6 499.9 666.6 499.9 758.6 499.9 833.1 425.4 833.1 333.4 833.1 300.8 823.5 268.9 805.4 241.7L933.1 114 933.1 200.2C932.9 212.2 939.2 223.4 949.6 229.4 959.9 235.5 972.8 235.5 983.2 229.4 993.5 223.4 999.8 212.2 999.7 200.2L999.7 37.9C1001 28.2 998 18.4 991.5 11.1 984.9 3.8 975.5-0.3 965.7 0L965.7 0ZM333.5 499.9C241.6 499.9 167 574.5 167 666.5 167.1 699.1 176.7 731 194.7 758.2L67.1 885.8 67.1 799.7C67.2 790.7 63.7 782 57.3 775.7 51 769.3 42.3 765.8 33.3 765.9 14.9 766.2 0.2 781.3 0.5 799.7L0.5 961.2C-1.3 971.8 2.2 982.6 9.8 990.2 17.4 997.9 28.2 1001.3 38.9 999.5L200.3 999.5C212.3 999.7 223.5 993.4 229.6 983 235.6 972.6 235.6 959.8 229.6 949.4 223.5 939.1 212.3 932.8 200.3 932.9L114.2 932.9 241.8 805.3C269 823.3 300.9 833 333.5 833 425.5 833 500.1 758.4 500.1 666.5 500.1 574.5 425.5 499.9 333.5 499.9Z",
"width": 1000
},
"search": [
"pinch_to_zoom"
]
}
]
}
Binary file modified packages/smooth_app/assets/fonts/icons/icons.sketch
Binary file not shown.
7 changes: 7 additions & 0 deletions packages/smooth_app/assets/fonts/icons/pinch_to_zoom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class PictureNotFound extends StatelessWidget {
final bool _useInk;
final PictureNotFoundStyle style;

static const Color defaultBackgroundColor = Color(0xFFE5E5E5);

@override
Widget build(BuildContext context) {
final Widget child = SizedBox.expand(
Expand All @@ -55,7 +57,7 @@ class PictureNotFound extends StatelessWidget {
if (_useInk) {
return Ink(
decoration: BoxDecoration(
color: backgroundColor ?? const Color(0xFFE5E5E5),
color: backgroundColor ?? defaultBackgroundColor,
).copyWith(
color: backgroundDecoration?.color,
image: backgroundDecoration?.image,
Expand Down
12 changes: 12 additions & 0 deletions packages/smooth_app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,18 @@
"@edit_product_form_item_ingredients_title": {
"description": "Product edition - Ingredients - Title (note: this section was previously called Ingredients & Origins)"
},
"edit_product_form_item_ingredients_pinch_to_zoom_tooltip": "Zoom in and out by pinching the screen",
"@edit_product_form_item_ingredients_pinch_to_zoom_tooltip": {
"description": "Product edition - Ingredients - Pinch to zoom icon explanation"
},
"edit_product_form_item_ingredients_pinch_to_zoom_title": "Zoom in and out the photo",
"@edit_product_form_item_ingredients_pinch_to_zoom_title": {
"description": "Product edition - Ingredients - Pinch to zoom explanation title"
},
"edit_product_form_item_ingredients_pinch_to_zoom_message": "Using the **Pinch-to-zoom gesture**, you can zoom in or out the photo:",
"@edit_product_form_item_ingredients_pinch_to_zoom_message": {
"description": "Product edition - Ingredients - Pinch to zoom explanation message"
},
"edit_product_form_item_add_valid_item_tooltip": "Add",
"edit_product_form_item_add_invalid_item_tooltip": "Please enter a text first",
"edit_product_form_item_remove_item_tooltip": "Remove",
Expand Down
12 changes: 12 additions & 0 deletions packages/smooth_app/lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,18 @@
"@edit_product_form_item_ingredients_title": {
"description": "Product edition - Ingredients - Title (note: this section was previously called Ingredients & Origins)"
},
"edit_product_form_item_ingredients_pinch_to_zoom_tooltip": "Agrandir ou réduire avec un geste de \"Pinch-to-zoom\"",
"@edit_product_form_item_ingredients_pinch_to_zoom_tooltip": {
"description": "Product edition - Ingredients - Pinch to zoom icon explanation"
},
"edit_product_form_item_ingredients_pinch_to_zoom_title": "Agrandir ou réduire la photo",
"@edit_product_form_item_ingredients_pinch_to_zoom_title": {
"description": "Product edition - Ingredients - Pinch to zoom explanation title"
},
"edit_product_form_item_ingredients_pinch_to_zoom_message": "En utilisant le geste dit de **Pinch-to-zoom**, vous pouvez agrandir ou réduire l'image :",
"@edit_product_form_item_ingredients_pinch_to_zoom_message": {
"description": "Product edition - Ingredients - Pinch to zoom explanation message"
},
"edit_product_form_item_add_valid_item_tooltip": "Ajouter",
"edit_product_form_item_add_invalid_item_tooltip": "Veuillez d'abord saisir un texte",
"edit_product_form_item_remove_item_tooltip": "Retirer",
Expand Down
Loading

0 comments on commit 975ab43

Please sign in to comment.