Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"appBarTitleLocation": "Location Info",
"bottomScrubberSemanticScrubber": "scrubber",
"bottomScrubberSemanticTimeline": "Timeline Scrubber, drag horizontally to navigate the timeline.",
"rangeSelector": "Range selector, drag horizontally to adjust the range.",
"collectionLabelDiscovered": "{percentage}% discovered",
"@collectionLabelDiscovered": {"placeholders": {"percentage": {}}},
"collectionLabelCount": "{count} of {total}",
Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ abstract class AppLocalizations {
/// **'Timeline Scrubber, drag horizontally to navigate the timeline.'**
String get bottomScrubberSemanticTimeline;

/// No description provided for @rangeSelector.
///
/// In en, this message translates to:
/// **'Range selector, drag horizontally to adjust the range.'**
String get rangeSelector;

/// No description provided for @collectionLabelDiscovered.
///
/// In en, this message translates to:
Expand Down
4 changes: 4 additions & 0 deletions lib/l10n/app_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class AppLocalizationsEn extends AppLocalizations {
String get bottomScrubberSemanticTimeline =>
'Timeline Scrubber, drag horizontally to navigate the timeline.';

@override
String get rangeSelector =>
'Range selector, drag horizontally to adjust the range.';

@override
String collectionLabelDiscovered(Object percentage) {
return '$percentage% discovered';
Expand Down
3 changes: 3 additions & 0 deletions lib/l10n/app_localizations_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class AppLocalizationsZh extends AppLocalizations {
String get bottomScrubberSemanticTimeline =>
'Timeline Scrubber,水平拖动可在历史年表中导航。';

@override
String get rangeSelector => 'Range selector, 水平拖动即可调整范围。';

@override
String collectionLabelDiscovered(Object percentage) {
return '已发现 $percentage% ';
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"appBarTitleLocation": "地理位置",
"bottomScrubberSemanticScrubber": "scrubber",
"bottomScrubberSemanticTimeline": "Timeline Scrubber,水平拖动可在历史年表中导航。",
"rangeSelector": "Range selector, 水平拖动即可调整范围。",
"collectionLabelDiscovered": "已发现 {percentage}% ",
"collectionLabelCount": "{count}/{total}",
"collectionButtonReset": "重置收藏夹",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,16 @@ class _OpenedTimeRange extends StatelessWidget {

// Time slider itself
Positioned.fill(
child: MergeSemantics(
child: Semantics(
label: $strings.bottomScrubberSemanticTimeline,
child: RangeSelector(
key: ValueKey('RangeSelectorIsWonderTime'),
min: wondersLogic.timelineStartYear * 1.0,
max: wondersLogic.timelineEndYear * 1.0,
minDelta: 500,
start: startYear,
end: endYear,
onUpdated: onChange,
),
child: Semantics(
label: $strings.bottomScrubberSemanticTimeline,
child: RangeSelector(
key: ValueKey('RangeSelectorIsWonderTime'),
min: wondersLogic.timelineStartYear * 1.0,
max: wondersLogic.timelineEndYear * 1.0,
minDelta: 500,
start: startYear,
end: endYear,
onUpdated: onChange,
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,14 @@ class _RangeSelectorState extends State<RangeSelector> {
child: _getDragDetector(
onUpdate: _handleMidDrag,
dragWidth: dragWidth,
child: Container(
decoration: BoxDecoration(
color: $styles.colors.offWhite.withOpacity(0),
border: Border.symmetric(
horizontal: BorderSide(color: $styles.colors.white.withOpacity(0.75), width: 2),
child: Semantics(
label: $strings.bottomScrubberSemanticTimeline,
child: Container(
decoration: BoxDecoration(
color: $styles.colors.offWhite.withOpacity(0),
border: Border.symmetric(
horizontal: BorderSide(color: $styles.colors.white.withOpacity(0.75), width: 2),
),
),
),
),
Expand All @@ -107,19 +110,22 @@ class _RangeSelectorState extends State<RangeSelector> {
return _getDragDetector(
onUpdate: isRight ? _handleRightDrag : _handleLeftDrag,
dragWidth: dragWidth,
child: Transform.scale(
scaleX: isRight ? 1 : -1,
child: Container(
alignment: Alignment.center,
width: RangeSelector.handleWidth,
decoration: BoxDecoration(
color: $styles.colors.white.withOpacity(0.75),
borderRadius: BorderRadius.only(
topRight: Radius.circular($styles.corners.md),
bottomRight: Radius.circular($styles.corners.md),
child: Semantics(
label: $strings.rangeSelector,
child: Transform.scale(
scaleX: isRight ? 1 : -1,
child: Container(
alignment: Alignment.center,
width: RangeSelector.handleWidth,
decoration: BoxDecoration(
color: $styles.colors.white.withOpacity(0.75),
borderRadius: BorderRadius.only(
topRight: Radius.circular($styles.corners.md),
bottomRight: Radius.circular($styles.corners.md),
),
),
child: Icon(Icons.chevron_right, color: $styles.colors.greyStrong, size: RangeSelector.handleWidth),
),
child: Icon(Icons.chevron_right, color: $styles.colors.greyStrong, size: RangeSelector.handleWidth),
),
),
);
Expand Down