rtl fixes
This commit is contained in:
parent
d409e5191d
commit
643b9ab77c
4 changed files with 11 additions and 7 deletions
|
@ -3,6 +3,7 @@ import 'dart:async';
|
||||||
import 'package:aves/theme/colors.dart';
|
import 'package:aves/theme/colors.dart';
|
||||||
import 'package:aves/theme/icons.dart';
|
import 'package:aves/theme/icons.dart';
|
||||||
import 'package:aves/widgets/common/action_controls/quick_choosers/common/quick_chooser.dart';
|
import 'package:aves/widgets/common/action_controls/quick_choosers/common/quick_chooser.dart';
|
||||||
|
import 'package:aves/widgets/common/extensions/build_context.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class RateQuickChooser extends StatefulWidget {
|
class RateQuickChooser extends StatefulWidget {
|
||||||
|
@ -92,8 +93,7 @@ class _RateQuickChooserState extends State<RateQuickChooser> {
|
||||||
final contentWidth = chooserSize.width - padding;
|
final contentWidth = chooserSize.width - padding;
|
||||||
|
|
||||||
final local = chooserBox.globalToLocal(globalPosition);
|
final local = chooserBox.globalToLocal(globalPosition);
|
||||||
final dx = local.dx - padding / 2;
|
final t = (local.dx - padding / 2) / contentWidth;
|
||||||
|
valueNotifier.value = (5 * (context.isRtl ? 1 - t : t)).ceil().clamp(0, 5);
|
||||||
valueNotifier.value = (5 * dx / contentWidth).ceil().clamp(0, 5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,9 @@ class ScaleBar extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
alignment: AlignmentDirectional.bottomStart,
|
// keep `left` (and not `start`) because zoom buttons are kept right
|
||||||
|
// because `Google` logo on Google layers are always in the bottom left
|
||||||
|
alignment: Alignment.bottomLeft,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|
|
@ -330,8 +330,8 @@ class _BasicInfoState extends State<_BasicInfo> {
|
||||||
l10n.viewerInfoLabelTitle: title,
|
l10n.viewerInfoLabelTitle: title,
|
||||||
l10n.viewerInfoLabelDate: dateText,
|
l10n.viewerInfoLabelDate: dateText,
|
||||||
if (entry.isVideo) ..._buildVideoRows(context),
|
if (entry.isVideo) ..._buildVideoRows(context),
|
||||||
if (showResolution) l10n.viewerInfoLabelResolution: rasterResolutionText,
|
if (showResolution) l10n.viewerInfoLabelResolution: _forceDirectionality(rasterResolutionText),
|
||||||
l10n.viewerInfoLabelSize: sizeText,
|
l10n.viewerInfoLabelSize: _forceDirectionality(sizeText),
|
||||||
if (!entry.trashed) l10n.viewerInfoLabelUri: entry.uri,
|
if (!entry.trashed) l10n.viewerInfoLabelUri: entry.uri,
|
||||||
if (path != null) l10n.viewerInfoLabelPath: path,
|
if (path != null) l10n.viewerInfoLabelPath: path,
|
||||||
if (ownerPackage != null) l10n.viewerInfoLabelOwner: ownerPackage,
|
if (ownerPackage != null) l10n.viewerInfoLabelOwner: ownerPackage,
|
||||||
|
@ -383,4 +383,6 @@ class _BasicInfoState extends State<_BasicInfo> {
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String _forceDirectionality(String text) => context.isRtl ? '${Unicode.RLI}$text${Unicode.PDI}' : '${Unicode.LRI}$text${Unicode.PDI}';
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ void main() {
|
||||||
await driver.scanMediaDir(screenshotsTargetDirAndroid);
|
await driver.scanMediaDir(screenshotsTargetDirAndroid);
|
||||||
// recent heavy images may delay cataloguing because of thumbnail loading precedence
|
// recent heavy images may delay cataloguing because of thumbnail loading precedence
|
||||||
// so we wait enough to avoid cataloguing progress subtitle in app bar when taking screenshots
|
// so we wait enough to avoid cataloguing progress subtitle in app bar when taking screenshots
|
||||||
await Future.delayed(const Duration(seconds: 30));
|
await Future.delayed(const Duration(seconds: 40));
|
||||||
}, timeout: const Timeout(Duration(minutes: 1)));
|
}, timeout: const Timeout(Duration(minutes: 1)));
|
||||||
|
|
||||||
languageCodes.forEach((languageCode) {
|
languageCodes.forEach((languageCode) {
|
||||||
|
|
Loading…
Reference in a new issue