Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
fix: Improve location circle preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Sep 9, 2023
1 parent b422b5f commit d5449fc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/screens/LocationsOverviewScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,6 @@ class _LocationsOverviewScreenState extends State<LocationsOverviewScreen>
final viewService = context.read<ViewService>();
final locationFetchers = context.read<LocationFetchers>();

final shades = getPrimaryColorShades(context);

final Iterable<(TaskView, LocationPointService)> circleLocations =
selectedViewID == null
? locationFetchers.fetchers
Expand Down Expand Up @@ -842,6 +840,7 @@ class _LocationsOverviewScreenState extends State<LocationsOverviewScreen>
}

final lastCenter = settings.getLastMapLocation()?.toLatLng();
final colorOpacityMultiplier = selectedViewID == null ? 1.0 : .1;
return LocusFlutterMap(
mapController: flutterMapController,
options: MapOptions(
Expand All @@ -862,8 +861,8 @@ class _LocationsOverviewScreenState extends State<LocationsOverviewScreen>
useRadiusInMeter: true,
point: LatLng(location.latitude, location.longitude),
borderStrokeWidth: 1,
color: view.color.withOpacity(.1),
borderColor: view.color,
color: view.color.withOpacity(.1 * colorOpacityMultiplier),
borderColor: view.color.withOpacity(colorOpacityMultiplier),
);
})
.toList()
Expand All @@ -879,9 +878,9 @@ class _LocationsOverviewScreenState extends State<LocationsOverviewScreen>
visibleLocation!.latitude,
visibleLocation!.longitude,
),
borderStrokeWidth: 3,
color: shades[500]!.withOpacity(.3),
borderColor: shades[500]!,
borderStrokeWidth: 5,
color: selectedView!.color.withOpacity(.2),
borderColor: selectedView!.color,
)
],
),
Expand Down

0 comments on commit d5449fc

Please sign in to comment.