mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-14 19:26:51 -04:00
Mirror the shell for right-to-left UI languages (DIST-220-4) (#3114)
* Mirror the shell for right-to-left UI languages (DIST-220-4) Arabic, Hebrew, Persian and Urdu read right to left, but the window's chrome was hard-wired left to right, so an RTL catalog (#2505) would put Arabic labels into a left-to-right layout. The reading direction now follows the language code (i18n::dir_for_code: ar, ckb, dv, fa, he, ps, sd, ug, ur, yi), so a catalog needs no extra setting and the LANGUAGES rows are unchanged. In a right-to-left language the shell mirrors: - the menu bar starts at the right with File; menus open under their title's right edge, and the arrow keys step through them in screen order - the toolbox docks on the right, the panel dock and its rail on the left; tool flyouts open towards the canvas and their corner marks and the header chevrons follow - the title, options and status bars read from the right, with the workspace controls and the Fit/progress group at the left end; the title and window-drag gap use the free span between them New module direction.rs holds the helpers (start_panel/end_panel, row/trailing layouts, horizontal_centered, the popup alignment). Left to right, every change lays out as before. No RTL catalog ships yet, so PHOTOCRAFT_UI_DIRECTION=rtl forces the mirrored layout for review (read once, native only). Panel interiors, dialogs, menu rows, submenus and document tabs stay left to right, and egui still draws UI labels without Arabic shaping or bidi reordering; docs/localization.md and the parity docs say so. Adds Lucide's chevron-left (the status bar's info menu arrow points left in RTL; Timeline's Previous frame button asked for it too and drew the fallback square). Co-Authored-By: Claude Opus 5.5 <[email protected]> * Localization docs: egui shapes Arabic words; what's missing is a font and bidi word order egui 0.36 shapes right-to-left runs with HarfRust, so letters join within a word. The gaps are an Arabic fallback font in the UI and paragraph bidi (words are placed left to right; emilk/egui#8576, #8577). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: MathMattTech <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
16 files changed
+430
-67
No files matched your search
@@ -66,7 +66,7 @@ id = "DIST-220-4"
|
||||
target = "Translation coverage per language reported by xtask; RTL layout for Arabic and Hebrew"
|
||||
status = "partial"
|
||||
issue = 220
|
||||
note = "`cargo xtask i18n-coverage` reports per-language coverage (#427); no RTL layout yet"
|
||||
note = "`cargo xtask i18n-coverage` reports per-language coverage (#427); RTL languages mirror the shell (`direction.rs`), not yet panel interiors or dialogs"
|
||||
|
||||
[[item]]
|
||||
id = "DIST-220-5"
|
||||
|
||||
Reference in new issue
Block a user