Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2408,5 +2408,8 @@
"Import dropped files without review": "Importovat přetažené soubory bez kontroly",
"An import is running": "Import už běží",
"An import is running. Drop photos when it has finished": "Import už běží. Fotky přetáhněte, až skončí",
"Finish Lightroom catalog import before adding photos": "Dokončete import katalogu Lightroom, než přidáte fotky"
"Finish Lightroom catalog import before adding photos": "Dokončete import katalogu Lightroom, než přidáte fotky",
"Top bar": "Horní lišta",
"Tool strip": "Pruh nástrojů",
"Bottom bar": "Dolní lišta"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -3440,5 +3440,8 @@
"Import dropped files without review": "Abgelegte Dateien ohne Prüfung importieren",
"An import is running": "Ein Import läuft",
"An import is running. Drop photos when it has finished": "Ein Import läuft. Lege die Fotos ab, wenn er fertig ist",
"Finish Lightroom catalog import before adding photos": "Schließe den Import des Lightroom-Katalogs ab, bevor du Fotos hinzufügst"
"Finish Lightroom catalog import before adding photos": "Schließe den Import des Lightroom-Katalogs ab, bevor du Fotos hinzufügst",
"Top bar": "Obere Leiste",
"Tool strip": "Werkzeugleiste",
"Bottom bar": "Untere Leiste"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2358,5 +2358,8 @@
"Import dropped files without review": "Importar los archivos soltados sin revisión",
"An import is running": "Hay una importación en curso",
"An import is running. Drop photos when it has finished": "Hay una importación en curso. Suelta las fotos cuando termine",
"Finish Lightroom catalog import before adding photos": "Termina la importación del catálogo de Lightroom antes de añadir fotos"
"Finish Lightroom catalog import before adding photos": "Termina la importación del catálogo de Lightroom antes de añadir fotos",
"Top bar": "Barra superior",
"Tool strip": "Barra de herramientas",
"Bottom bar": "Barra inferior"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2327,5 +2327,8 @@
"Drop to open the face model": "Pudota avataksesi kasvomallin",
"Dropped Files": "Pudotetut tiedostot",
"Finish Lightroom catalog import before adding photos": "Viimeistele Lightroom-luettelon tuonti ennen kuvien lisäämistä",
"Import dropped files without review": "Tuo pudotetut tiedostot ilman tarkistusta"
"Import dropped files without review": "Tuo pudotetut tiedostot ilman tarkistusta",
"Top bar": "Yläpalkki",
"Tool strip": "Työkalupalkki",
"Bottom bar": "Alapalkki"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2390,5 +2390,8 @@
"Checking recent libraries": "Vérification des bibliothèques récentes",
"The photos are imported once a library is open": "Les photos seront importées dès qu'une bibliothèque sera ouverte",
"Open a library first, then drop the presets again": "Ouvrez d'abord une bibliothèque, puis déposez à nouveau les préréglages",
"This library couldn't be checked:": "Impossible de vérifier cette bibliothèque :"
"This library couldn't be checked:": "Impossible de vérifier cette bibliothèque :",
"Top bar": "Barre supérieure",
"Tool strip": "Barre d’outils",
"Bottom bar": "Barre inférieure"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -2339,5 +2339,8 @@
"Drop to open the face model": "Jatuhkan untuk membuka model wajah",
"Dropped Files": "File yang dijatuhkan",
"Finish Lightroom catalog import before adding photos": "Selesaikan impor katalog Lightroom sebelum menambahkan foto",
"Import dropped files without review": "Impor file yang dijatuhkan tanpa tinjauan"
"Import dropped files without review": "Impor file yang dijatuhkan tanpa tinjauan",
"Top bar": "Bilah atas",
"Tool strip": "Bilah alat",
"Bottom bar": "Bilah bawah"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -2361,5 +2361,8 @@
"Import dropped files without review": "Importa i file rilasciati senza revisione",
"An import is running": "Un'importazione è in corso",
"An import is running. Drop photos when it has finished": "Un'importazione è in corso. Trascina le foto quando è finita",
"Finish Lightroom catalog import before adding photos": "Termina l'importazione del catalogo Lightroom prima di aggiungere foto"
"Finish Lightroom catalog import before adding photos": "Termina l'importazione del catalogo Lightroom prima di aggiungere foto",
"Top bar": "Barra superiore",
"Tool strip": "Barra degli strumenti",
"Bottom bar": "Barra inferiore"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2356,5 +2356,8 @@
"Import dropped files without review": "ドロップしたファイルを確認せずに読み込む",
"An import is running": "読み込み中です",
"An import is running. Drop photos when it has finished": "読み込み中です。完了してから写真をドロップしてください",
"Finish Lightroom catalog import before adding photos": "写真を追加する前に Lightroom カタログの読み込みを完了してください"
"Finish Lightroom catalog import before adding photos": "写真を追加する前に Lightroom カタログの読み込みを完了してください",
"Top bar": "上部バー",
"Tool strip": "ツールバー",
"Bottom bar": "下部バー"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/ka.json
Original file line number Diff line number Diff line change
Expand Up @@ -2734,5 +2734,8 @@
"Import dropped files without review": "ჩაგდებული ფაილების იმპორტი გადახედვის გარეშე",
"An import is running": "იმპორტი მიმდინარეობს",
"An import is running. Drop photos when it has finished": "იმპორტი მიმდინარეობს. ფოტოები ჩააგდეთ, როცა დასრულდება",
"Finish Lightroom catalog import before adding photos": "ფოტოების დამატებამდე დაასრულეთ Lightroom-ის კატალოგის იმპორტი"
"Finish Lightroom catalog import before adding photos": "ფოტოების დამატებამდე დაასრულეთ Lightroom-ის კატალოგის იმპორტი",
"Top bar": "ზედა ზოლი",
"Tool strip": "ხელსაწყოების ზოლი",
"Bottom bar": "ქვედა ზოლი"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2283,5 +2283,8 @@
"Import dropped files without review": "Importuj upuszczone pliki bez przeglądu",
"An import is running": "Import jest w toku",
"An import is running. Drop photos when it has finished": "Import jest w toku. Upuść zdjęcia, gdy się zakończy",
"Finish Lightroom catalog import before adding photos": "Zakończ import katalogu Lightrooma, zanim dodasz zdjęcia"
"Finish Lightroom catalog import before adding photos": "Zakończ import katalogu Lightrooma, zanim dodasz zdjęcia",
"Top bar": "Górny pasek",
"Tool strip": "Pasek narzędzi",
"Bottom bar": "Dolny pasek"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -2202,5 +2202,8 @@
"Import dropped files without review": "Importar arquivos soltos sem revisão",
"An import is running": "Uma importação está em andamento",
"An import is running. Drop photos when it has finished": "Uma importação está em andamento. Solte as fotos quando ela terminar",
"Finish Lightroom catalog import before adding photos": "Conclua a importação do catálogo do Lightroom antes de adicionar fotos"
"Finish Lightroom catalog import before adding photos": "Conclua a importação do catálogo do Lightroom antes de adicionar fotos",
"Top bar": "Barra superior",
"Tool strip": "Barra de ferramentas",
"Bottom bar": "Barra inferior"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2349,5 +2349,8 @@
"Import dropped files without review": "Импортировать перетащенные файлы без проверки",
"An import is running": "Импорт уже выполняется",
"An import is running. Drop photos when it has finished": "Импорт уже выполняется. Перетащите фото, когда он закончится",
"Finish Lightroom catalog import before adding photos": "Завершите импорт каталога Lightroom, прежде чем добавлять фото"
"Finish Lightroom catalog import before adding photos": "Завершите импорт каталога Lightroom, прежде чем добавлять фото",
"Top bar": "Верхняя панель",
"Tool strip": "Панель инструментов",
"Bottom bar": "Нижняя панель"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -2429,5 +2429,8 @@
"Drop to open the face model": "Släpp för att öppna ansiktsmodellen",
"Dropped Files": "Släppta filer",
"Finish Lightroom catalog import before adding photos": "Slutför importen av Lightroom-katalogen innan du lägger till foton",
"Import dropped files without review": "Importera släppta filer utan granskning"
"Import dropped files without review": "Importera släppta filer utan granskning",
"Top bar": "Övre fältet",
"Tool strip": "Verktygsfält",
"Bottom bar": "Nedre fältet"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2354,5 +2354,8 @@
"Import dropped files without review": "Імпортувати перетягнуті файли без перегляду",
"An import is running": "Імпорт уже виконується",
"An import is running. Drop photos when it has finished": "Імпорт уже виконується. Перетягніть фото, коли він завершиться",
"Finish Lightroom catalog import before adding photos": "Завершіть імпорт каталогу Lightroom, перш ніж додавати фото"
"Finish Lightroom catalog import before adding photos": "Завершіть імпорт каталогу Lightroom, перш ніж додавати фото",
"Top bar": "Верхня панель",
"Tool strip": "Панель інструментів",
"Bottom bar": "Нижня панель"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2235,5 +2235,8 @@
"Drop to open the face model": "Thả để mở mô hình khuôn mặt",
"Dropped Files": "Tệp đã thả",
"Finish Lightroom catalog import before adding photos": "Hoàn tất nhập danh mục Lightroom trước khi thêm ảnh",
"Import dropped files without review": "Nhập các tệp đã thả mà không xem lại"
"Import dropped files without review": "Nhập các tệp đã thả mà không xem lại",
"Top bar": "Thanh trên cùng",
"Tool strip": "Thanh công cụ",
"Bottom bar": "Thanh dưới cùng"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/zh-hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -2200,5 +2200,8 @@
"Import dropped files without review": "不经检查直接导入拖入的文件",
"An import is running": "正在导入",
"An import is running. Drop photos when it has finished": "正在导入。导入完成后再拖放照片",
"Finish Lightroom catalog import before adding photos": "添加照片前,请先完成 Lightroom 目录的导入"
"Finish Lightroom catalog import before adding photos": "添加照片前,请先完成 Lightroom 目录的导入",
"Top bar": "顶部栏",
"Tool strip": "工具栏",
"Bottom bar": "底部栏"
}
5 changes: 4 additions & 1 deletion crates/ui-egui/locales/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -2157,5 +2157,8 @@
"Import dropped files without review": "不經檢查直接匯入拖放的檔案",
"An import is running": "正在匯入",
"An import is running. Drop photos when it has finished": "正在匯入。匯入完成後再拖放照片",
"Finish Lightroom catalog import before adding photos": "新增照片前,請先完成 Lightroom 目錄的匯入"
"Finish Lightroom catalog import before adding photos": "新增照片前,請先完成 Lightroom 目錄的匯入",
"Top bar": "頂部列",
"Tool strip": "工具列",
"Bottom bar": "底部列"
}
11 changes: 9 additions & 2 deletions crates/ui-egui/src/docking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,24 @@ pub fn show(app: &mut crate::LightcraftApp, ui: &mut egui::Ui) {
panel_limits,
|ui, panel| match panel {
Panel::Canvas => {
canvas = Some(ui.new_child(egui::UiBuilder::new().id_salt("photo-view").max_rect(ui.max_rect())));
let child = ui.new_child(egui::UiBuilder::new().id_salt("photo-view").max_rect(ui.max_rect()));
crate::widgets::announce_region(&child, egui::accesskit::Role::Main, crate::i18n::tr(Panel::Canvas.label()));
canvas = Some(child);
}
Panel::Library => {
crate::widgets::announce_region(ui, egui::accesskit::Role::Navigation, crate::i18n::tr(Panel::Library.label()));
crate::widgets::register(ui, "panel:left_panel", ui.max_rect());
crate::panels::left::show(app, ui);
}
Panel::Tools => {
crate::widgets::announce_region(ui, egui::accesskit::Role::Complementary, crate::i18n::tr(Panel::Tools.label()));
crate::widgets::register(ui, "panel:right_panel", ui.max_rect());
crate::panels::right::show(app, ui);
}
Panel::Presets => crate::panels::presets::show(app, ui),
Panel::Presets => {
crate::widgets::announce_region(ui, egui::accesskit::Role::Complementary, crate::i18n::tr(Panel::Presets.label()));
crate::panels::presets::show(app, ui);
}
},
);
if let Some(mut canvas) = canvas {
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/src/panels/bottombar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui) {
.exact_size(t.bottom_bar_h)
.frame(egui::Frame::NONE.fill(t.chrome).inner_margin(egui::Margin { left: 12, right: 12, top: 0, bottom: 0 }))
.show(ui, |ui| {
crate::widgets::announce_region(ui, egui::accesskit::Role::Toolbar, crate::i18n::tr("Bottom bar"));
let full = ui.max_rect();
let compact_zoom = full.width() < 360.0;
let right_start = right_side(app, ui, full, compact_zoom);
Expand Down
6 changes: 5 additions & 1 deletion crates/ui-egui/src/panels/detail/filmstrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ pub(crate) fn filmstrip(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect) {
let ppp = ui.ctx().pixels_per_point();
if ids.is_empty() {
let why = if app.session.filter != Default::default() { "No photos match the filters (View → Clear Filters)" } else { "No photos" };
ui.painter().text(r.center(), Align2::CENTER_CENTER, why, t.font(12.5), t.text_dim);
// a label, not painted text, so a screen reader reads the reason; the region keeps the strip navigable
let mut empty = ui.new_child(egui::UiBuilder::new().max_rect(r).layout(egui::Layout::centered_and_justified(egui::Direction::TopDown)));
crate::widgets::announce_region(&empty, egui::accesskit::Role::Region, crate::i18n::tr("Filmstrip"));
empty.add(egui::Label::new(egui::RichText::new(why).font(t.font(12.5)).color(t.text_dim)).selectable(false));
return;
}
let mut child = ui.new_child(egui::UiBuilder::new().max_rect(r.shrink2(vec2(0.0, 4.0))));
crate::widgets::announce_region(&child, egui::accesskit::Role::Region, crate::i18n::tr("Filmstrip"));
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
// a vertical mouse wheel scrolls the strip sideways (horizontal trackpad scrolls still work)
child.style_mut().always_scroll_the_only_direction = true;
// only a new active photo (or the strip appearing) scrolls it; see `grid::follow_active`
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/src/panels/strip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui) {
.stroke(egui::Stroke::new(1.0, t.divider)),
)
.show(ui, |ui| {
crate::widgets::announce_region(ui, egui::accesskit::Role::Toolbar, crate::i18n::tr("Tool strip"));
let has_photo = app.session.active().is_some();
ui.vertical_centered(|ui| {
ui.spacing_mut().item_spacing.y = GAP;
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/src/panels/topbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui) {
.exact_size(t.top_bar_h)
.frame(egui::Frame::NONE.fill(t.chrome).inner_margin(egui::Margin { left, right: 12, top: 0, bottom: 0 }))
.show(ui, |ui| {
crate::widgets::announce_region(ui, egui::accesskit::Role::Toolbar, crate::i18n::tr("Top bar"));
let full = ui.max_rect();
// The whole bar, its margins included. The search field is centred on this and not on
// `full`, which is only what the margins leave: on macOS the left margin holds the
Expand Down
14 changes: 14 additions & 0 deletions crates/ui-egui/src/widgets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,20 @@ pub(crate) fn screen_reader_name(ctx: &egui::Context, id: egui::Id, name: &str)
ctx.accesskit_node_builder(id, |node| node.set_label(name.to_string()));
}

/// Names the part of the window `ui` draws for screen readers: a toolbar, or a landmark (VoiceOver's
/// rotor lists the landmarks and jumps to one). Set on the node the `Ui` already has, so nothing is
/// laid out differently. The node gets the `Ui`'s area as its bounds, so a screen reader's cursor
/// lands on the part and not on an empty spot.
pub(crate) fn announce_region(ui: &Ui, role: egui::accesskit::Role, name: impl Into<String>) {
let name = name.into();
let r = ui.max_rect();
ui.ctx().accesskit_node_builder(ui.unique_id(), |node| {
node.set_role(role);
node.set_label(name);
node.set_bounds(egui::accesskit::Rect { x0: f64::from(r.min.x), y0: f64::from(r.min.y), x1: f64::from(r.max.x), y1: f64::from(r.max.y) });
});
}

/// A hand-drawn clickable area (an icon, a tile, a row) announced as a button named `name`.
pub(crate) fn announce(resp: &egui::Response, name: impl Into<String>) {
let name = name.into();
Expand Down
Loading
Loading