viewer: keep controls in the lower right corner even with RTL locales
This commit is contained in:
parent
b17bfd196d
commit
1984e601b0
4 changed files with 79 additions and 70 deletions
|
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## <a id="unreleased"></a>[Unreleased]
|
## <a id="unreleased"></a>[Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Viewer: keep controls in the lower right corner even with RTL locales
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- crash when loading SVG defined with large dimensions
|
- crash when loading SVG defined with large dimensions
|
||||||
|
|
|
@ -186,7 +186,10 @@ class _BottomOverlayContentState extends State<_BottomOverlayContent> {
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
final viewInsetsPadding = (widget.viewInsets ?? EdgeInsets.zero) + (widget.viewPadding ?? EdgeInsets.zero);
|
final viewInsetsPadding = (widget.viewInsets ?? EdgeInsets.zero) + (widget.viewPadding ?? EdgeInsets.zero);
|
||||||
final selection = context.read<Selection<AvesEntry>?>();
|
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(
|
? SelectionButton(
|
||||||
mainEntry: mainEntry,
|
mainEntry: mainEntry,
|
||||||
scale: _buttonScale,
|
scale: _buttonScale,
|
||||||
|
@ -220,6 +223,7 @@ class _BottomOverlayContentState extends State<_BottomOverlayContent> {
|
||||||
scale: _buttonScale,
|
scale: _buttonScale,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final showMultiPageOverlay = mainEntry.isMultiPage && multiPageController != null;
|
final showMultiPageOverlay = mainEntry.isMultiPage && multiPageController != null;
|
||||||
|
@ -247,6 +251,8 @@ class _BottomOverlayContentState extends State<_BottomOverlayContent> {
|
||||||
(showMultiPageOverlay && collapsedPageScroller)
|
(showMultiPageOverlay && collapsedPageScroller)
|
||||||
? Row(
|
? Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
// always keep action buttons in the lower right corner, even with RTL locales
|
||||||
|
textDirection: TextDirection.ltr,
|
||||||
children: [
|
children: [
|
||||||
SafeArea(
|
SafeArea(
|
||||||
top: false,
|
top: false,
|
||||||
|
|
|
@ -40,7 +40,10 @@ class _VideoControlOverlayState extends State<VideoControlOverlay> with SingleTi
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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,
|
stream: statusStream,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
// do not use stream snapshot because it is obsolete when switching between videos
|
// do not use stream snapshot because it is obsolete when switching between videos
|
||||||
|
@ -78,6 +81,7 @@ class _VideoControlOverlayState extends State<VideoControlOverlay> with SingleTi
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6457,11 +6457,6 @@
|
||||||
"filePickerUseThisFolder"
|
"filePickerUseThisFolder"
|
||||||
],
|
],
|
||||||
|
|
||||||
"pt": [
|
|
||||||
"entryActionCast",
|
|
||||||
"castDialogTitle"
|
|
||||||
],
|
|
||||||
|
|
||||||
"ro": [
|
"ro": [
|
||||||
"saveCopyButtonLabel",
|
"saveCopyButtonLabel",
|
||||||
"applyTooltip",
|
"applyTooltip",
|
||||||
|
|
Loading…
Reference in a new issue