mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-14 21:02:03 +10:00
make raster tile source scollable
This commit is contained in:
@@ -626,6 +626,11 @@ class AppSettingsScreen extends StatelessWidget {
|
|||||||
title: const Text('Raster Tile Source'),
|
title: const Text('Raster Tile Source'),
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
width: 360,
|
width: 360,
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxHeight: MediaQuery.of(dialogContext).size.height * 0.6,
|
||||||
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
child: RadioGroup<String>(
|
child: RadioGroup<String>(
|
||||||
groupValue: selectedId,
|
groupValue: selectedId,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
@@ -647,6 +652,8 @@ class AppSettingsScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(dialogContext),
|
onPressed: () => Navigator.pop(dialogContext),
|
||||||
|
|||||||
@@ -288,9 +288,8 @@ class MapTileCacheService extends ChangeNotifier {
|
|||||||
|
|
||||||
String get urlTemplate => _buildUrlTemplate(appSettingsService.settings);
|
String get urlTemplate => _buildUrlTemplate(appSettingsService.settings);
|
||||||
|
|
||||||
TileBuilder? get tileBuilder => isInvertedOsmDarkSource
|
TileBuilder? get tileBuilder =>
|
||||||
? _osmDarkTileBuilder
|
isInvertedOsmDarkSource ? _osmDarkTileBuilder : null;
|
||||||
: null;
|
|
||||||
|
|
||||||
bool get isInvertedOsmDarkSource =>
|
bool get isInvertedOsmDarkSource =>
|
||||||
source.id == MapRasterSourceCatalog.osmDark.id;
|
source.id == MapRasterSourceCatalog.osmDark.id;
|
||||||
@@ -638,24 +637,52 @@ class MapTileCacheService extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _osmDarkTileBuilder(
|
Widget _osmDarkTileBuilder(BuildContext _, Widget tileWidget, TileImage tile) {
|
||||||
BuildContext _,
|
|
||||||
Widget tileWidget,
|
|
||||||
TileImage __,
|
|
||||||
) {
|
|
||||||
return ColorFiltered(
|
return ColorFiltered(
|
||||||
colorFilter: const ColorFilter.matrix(<double>[
|
colorFilter: const ColorFilter.matrix(<double>[
|
||||||
1.33, 0, 0, 0, 0,
|
1.33,
|
||||||
0, 1.33, 0, 0, 0,
|
0,
|
||||||
0, 0, 1.33, 0, 0,
|
0,
|
||||||
0, 0, 0, 1, 0,
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1.33,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1.33,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
]),
|
]),
|
||||||
child: ColorFiltered(
|
child: ColorFiltered(
|
||||||
colorFilter: const ColorFilter.matrix(<double>[
|
colorFilter: const ColorFilter.matrix(<double>[
|
||||||
0.5740000009536743, -1.4299999475479126, -0.14399999380111694, 0, 255,
|
0.5740000009536743,
|
||||||
-0.4259999990463257, -0.429999977350235, -0.14399999380111694, 0, 255,
|
-1.4299999475479126,
|
||||||
-0.4259999990463257, -1.4299999475479126, 0.8559999465942383, 0, 255,
|
-0.14399999380111694,
|
||||||
0, 0, 0, 1, 0,
|
0,
|
||||||
|
255,
|
||||||
|
-0.4259999990463257,
|
||||||
|
-0.429999977350235,
|
||||||
|
-0.14399999380111694,
|
||||||
|
0,
|
||||||
|
255,
|
||||||
|
-0.4259999990463257,
|
||||||
|
-1.4299999475479126,
|
||||||
|
0.8559999465942383,
|
||||||
|
0,
|
||||||
|
255,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
]),
|
]),
|
||||||
child: tileWidget,
|
child: tileWidget,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user