Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

test(i18n): cover RTL action bounds and refresh the current desktop previews

BlackSpiritsed7e78973df7
diff --git a/src/Filee.App/Assets/WhatsNew/2.0.0/pt-BR/more.webp b/src/Filee.App/Assets/WhatsNew/2.0.0/pt-BR/more.webp
index 5b0de21d..89a3769c 100644
Binary files a/src/Filee.App/Assets/WhatsNew/2.0.0/pt-BR/more.webp and b/src/Filee.App/Assets/WhatsNew/2.0.0/pt-BR/more.webp differ
diff --git a/src/Filee.App/Assets/WhatsNew/2.0.0/pt-PT/more.webp b/src/Filee.App/Assets/WhatsNew/2.0.0/pt-PT/more.webp
index 1c66e308..62b52052 100644
Binary files a/src/Filee.App/Assets/WhatsNew/2.0.0/pt-PT/more.webp and b/src/Filee.App/Assets/WhatsNew/2.0.0/pt-PT/more.webp differ
diff --git a/tests/Filee.App.Tests/PortugueseRenderTests.cs b/tests/Filee.App.Tests/PortugueseRenderTests.cs
index ca35a6ae..2c42b85a 100644
--- a/tests/Filee.App.Tests/PortugueseRenderTests.cs
+++ b/tests/Filee.App.Tests/PortugueseRenderTests.cs
@@ -221,8 +221,9 @@ public class PortugueseRenderTests
{
var button = window.GetVisualDescendants().OfType<Button>().Single(b => b.Name == name);
var text = button.GetVisualDescendants().OfType<TextBlock>().Single();
- var start = text.TranslatePoint(default, button)!.Value.X;
- Assert.True(start >= 0 && start + text.Bounds.Width <= button.Bounds.Width + 1,
+ var bounds = new Rect(text.Bounds.Size).TransformToAABB(text.TransformToVisual(button)!.Value);
+ Assert.True(bounds.Left >= -1 && bounds.Right <= button.Bounds.Width + 1 &&
+ text.TextLayout.Width <= text.Bounds.Width + 1,
$"{language}: '{text.Text}' exceeds its action button");
Assert.All(text.TextLayout.TextLines, line => Assert.False(line.HasCollapsed));
}