Skip to content

Commit

Permalink
Update map markers of shops
Browse files Browse the repository at this point in the history
  • Loading branch information
blazern committed Dec 22, 2021
1 parent 6951646 commit 3d0c737
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 83 deletions.
4 changes: 2 additions & 2 deletions assets/map_marker_accented.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions assets/map_marker_empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions assets/map_marker_filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions assets/map_marker_group_accented.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions assets/map_marker_group_empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions assets/map_marker_group_filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions assets/map_marker_group_selected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 5 additions & 38 deletions assets/map_marker_group_suggestions.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/map_marker_selected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions assets/map_marker_suggestions.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions lib/ui/base/text_styles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:plante/ui/base/colors_plante.dart';
import 'package:plante/ui/base/safe_font_environment_detector.dart';

class TextStyles {
static const _MARKER_FONT_SIZE = 15.0;
TextStyles._();

static const TextStyle normal =
Expand Down Expand Up @@ -132,19 +133,25 @@ class TextStyles {
static TextStyle markerFilled = TextStyle(
fontFamily: montserrat,
fontWeight: FontWeight.bold,
fontSize: 17,
fontSize: _MARKER_FONT_SIZE,
color: ColorsPlante.primary);

static TextStyle markerSuggestion = TextStyle(
fontFamily: montserrat,
fontWeight: FontWeight.bold,
fontSize: _MARKER_FONT_SIZE,
color: const Color(0xFF255B55));

static TextStyle markerAccented = TextStyle(
fontFamily: montserrat,
fontWeight: FontWeight.bold,
fontSize: 17,
fontSize: _MARKER_FONT_SIZE,
color: const Color(0xFFF02222));

static TextStyle markerEmpty = TextStyle(
fontFamily: montserrat,
fontWeight: FontWeight.bold,
fontSize: 17,
fontSize: _MARKER_FONT_SIZE,
color: ColorsPlante.grey);

static TextStyle licenceMarker = TextStyle(
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/map/map_page/map_page_mode_default.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ class MapPageModeDefault extends MapPageModeShopsCardBase {
key: const Key('filter_shops_with_rad_suggested_products'),
text: context
.strings.map_page_filter_shops_with_radius_suggested_products,
markerColor: const Color(0xFF61AB7B),
markerColor: const Color(0xFF3D948D),
value: _showSuggestionsAtShop[SuggestionType.RADIUS]!.watch(ref),
onChanged: _setShowRadSuggestedShops,
),
MapShopsFilterCheckbox(
key: const Key('filter_shops_with_off_suggested_products'),
text: context
.strings.map_page_filter_shops_with_off_suggested_products,
markerColor: const Color(0xFF61AB7B),
markerColor: const Color(0xFF3D948D),
value: _showSuggestionsAtShop[SuggestionType.OFF]!.watch(ref),
onChanged: _setShowOffSuggestedShops,
),
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/map/map_page/markers_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Future<BitmapDescriptor> _getMarkerBitmap(Iterable<Shop> shops,
context, 'assets/map_marker_filled.svg', 1, TextStyles.markerFilled);
} else if (shops.any(hasSuggestions)) {
return _bitmapDescriptorFromSvgAsset(context,
'assets/map_marker_suggestions.svg', 1, TextStyles.markerFilled);
'assets/map_marker_suggestions.svg', 1, TextStyles.markerSuggestion);
} else {
return _bitmapDescriptorFromSvgAsset(
context, 'assets/map_marker_empty.svg', 1, TextStyles.markerEmpty);
Expand Down Expand Up @@ -85,7 +85,7 @@ Future<BitmapDescriptor> _getMarkerBitmap(Iterable<Shop> shops,
context,
'assets/map_marker_group_suggestions.svg',
shops.length,
TextStyles.markerEmpty);
TextStyles.markerSuggestion);
} else {
return _bitmapDescriptorFromSvgAsset(
context,
Expand Down Expand Up @@ -152,7 +152,7 @@ Future<BitmapDescriptor> _bitmapDescriptorFromSvgAsset(BuildContext context,
xOffset = 21.5 * devicePixelRatio;
}

final yOffset = 10.5 * devicePixelRatio;
final yOffset = 11.5 * devicePixelRatio;
_textPainter.paint(
canvas, Offset(xOffset - _textPainter.width / 2, yOffset));
}
Expand Down

0 comments on commit 3d0c737

Please sign in to comment.