viewer: keep controls in the lower right corner even with RTL locales

This commit is contained in:
Thibault Deckers 2023-12-24 16:48:19 +01:00
parent b17bfd196d
commit 1984e601b0
4 changed files with 79 additions and 70 deletions

View file

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
## <a id="unreleased"></a>[Unreleased]
### Changed
- Viewer: keep controls in the lower right corner even with RTL locales
### Fixed
- crash when loading SVG defined with large dimensions

View file

@ -186,7 +186,10 @@ class _BottomOverlayContentState extends State<_BottomOverlayContent> {
builder: (context, child) {
final viewInsetsPadding = (widget.viewInsets ?? EdgeInsets.zero) + (widget.viewPadding ?? EdgeInsets.zero);
final selection = context.read<Selection<AvesEntry>?>();
final viewerButtonRow = (selection?.isSelecting ?? false)
final viewerButtonRow = Directionality(
// always keep action buttons in the lower right corner, even with RTL locales
textDirection: TextDirection.ltr,
child: (selection?.isSelecting ?? false)
? SelectionButton(
mainEntry: mainEntry,
scale: _buttonScale,
@ -220,6 +223,7 @@ class _BottomOverlayContentState extends State<_BottomOverlayContent> {
scale: _buttonScale,
),
),
),
);
final showMultiPageOverlay = mainEntry.isMultiPage && multiPageController != null;
@ -247,6 +251,8 @@ class _BottomOverlayContentState extends State<_BottomOverlayContent> {
(showMultiPageOverlay && collapsedPageScroller)
? Row(
crossAxisAlignment: CrossAxisAlignment.center,
// always keep action buttons in the lower right corner, even with RTL locales
textDirection: TextDirection.ltr,
children: [
SafeArea(
top: false,

View file

@ -40,7 +40,10 @@ class _VideoControlOverlayState extends State<VideoControlOverlay> with SingleTi
@override
Widget build(BuildContext context) {
return StreamBuilder<VideoStatus>(
return Directionality(
// always keep action buttons in the lower right corner, even with RTL locales
textDirection: TextDirection.ltr,
child: StreamBuilder<VideoStatus>(
stream: statusStream,
builder: (context, snapshot) {
// do not use stream snapshot because it is obsolete when switching between videos
@ -78,6 +81,7 @@ class _VideoControlOverlayState extends State<VideoControlOverlay> with SingleTi
],
);
},
),
);
}
}

View file

@ -6457,11 +6457,6 @@
"filePickerUseThisFolder"
],
"pt": [
"entryActionCast",
"castDialogTitle"
],
"ro": [
"saveCopyButtonLabel",
"applyTooltip",