PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Merge PR #7662: Preferences: Zoom Resizes Windows resizes floating document windows, and the Zoom tool shows it as Resize Windows to Fit (#204)
aiongg57028352b4e2
diff --cc crates/engine/src/prefs.rsindex f56394407,dfbeb0cd8..ffbebdafe--- a/crates/engine/src/prefs.rs+++ b/crates/engine/src/prefs.rs@@@ -1066,9 -1028,10 +1066,8 @@@ pub const SECTIONS: [(&str, &str); 18]/// preference is read anywhere outside `prefs.rs`, and while an unlisted one is read nowhere.pub const HIDDEN_UNTIL_IMPLEMENTED: &[&str] = &["general.colorPicker",- "general.zoomResizesWindows",- "general.animatedZoom","workspace.autoShowHiddenPanels","workspace.enableFloatingDocumentWindowDocking",- "fileHandling.saveInBackground","performance.cacheLevels","performance.effectCacheMb","performance.legacyCompositing",diff --cc crates/ui-egui/src/i18n/cs.tsvindex e93f2b7c6,5e01701f2..f60a504ca--- a/crates/ui-egui/src/i18n/cs.tsv+++ b/crates/ui-egui/src/i18n/cs.tsv@@@ -3918,14 -3852,4 +3918,15 @@@ navigator Zoom Zvětšen�Use PoužítIn Front VpředuBehind Vzadu++# DDS Options (#1327)+ DDS Options Možnosti DDS+ Generate Mipmaps Generovat mipmapy++# Color Table (.act) dialog+ There is no color table to save. Neexistuje žádná tabulka barev k uložení.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Uložena {n} barva do {file}|Uloženy {n} barvy do {file}|Uloženo {n} barev do {file}++# Graphics Adapter preference (#1885)+ GPU adapter Adaptér GPU+ Resize Windows to Fit Přizpůsobit velikost okendiff --cc crates/ui-egui/src/i18n/de.tsvindex 82336c254,7686f0313..7b2574271--- a/crates/ui-egui/src/i18n/de.tsv+++ b/crates/ui-egui/src/i18n/de.tsv@@@ -3315,15 -3245,4 +3315,16 @@@ curves Smooth GlätteIn Front DavorBehind DahinterBlend Mischen++# DDS Options (#1327)+ DDS Options DDS-Optionen+ Compression Komprimierung+ Generate Mipmaps Mipmaps erzeugen++# Color Table (.act) dialog+ There is no color table to save. Es gibt keine Farbtabelle zum Speichern.+@plural Saved {n} color to {file}|Saved {n} colors to {file} {n} Farbe in {file} gespeichert|{n} Farben in {file} gespeichert++# Graphics Adapter preference (#1885)+ GPU adapter GPU-Adapter+ Resize Windows to Fit Fenstergröße anpassendiff --cc crates/ui-egui/src/i18n/el.tsvindex 674973ae1,2e58699d3..6bfa8454f--- a/crates/ui-egui/src/i18n/el.tsv+++ b/crates/ui-egui/src/i18n/el.tsv@@@ -4007,14 -3944,4 +4007,15 @@@ curves Smooth Εξομάλυνσ�Use ΧρήσηIn Front ΜπροστάBehind Πίσω++# DDS Options (#1327)+ DDS Options Επιλογές DDS+ Generate Mipmaps Δημιουργία mipmap++# Color Table (.act) dialog+ There is no color table to save. Δεν υπάρχει πίνακας χρωμάτων για αποθήκευση.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Αποθηκεύτηκε {n} χρώμα στο {file}|Αποθηκεύτηκαν {n} χρώματα στο {file}++# Graphics Adapter preference (#1885)+ GPU adapter Προσαρμογέας GPU+ Resize Windows to Fit Προσαρμογή μεγέθους παραθύρωνdiff --cc crates/ui-egui/src/i18n/es.tsvindex 81c32ba1e,afbf83be6..ee99a81b9--- a/crates/ui-egui/src/i18n/es.tsv+++ b/crates/ui-egui/src/i18n/es.tsv@@@ -4269,14 -4206,4 +4269,15 @@@ navigator Zoom ZooUse UsarIn Front DelanteBehind Detrás++# DDS Options (#1327)+ DDS Options Opciones de DDS+ Generate Mipmaps Generar mipmaps++# Color Table (.act) dialog+ There is no color table to save. No hay ninguna tabla de colores para guardar.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Se guardó {n} color en {file}|Se guardaron {n} colores en {file}++# Graphics Adapter preference (#1885)+ GPU adapter Adaptador de GPU+ Resize Windows to Fit Redimensionar ventanas para ajustardiff --cc crates/ui-egui/src/i18n/fr.tsvindex a72039f1b,e1f3f1ace..a72a3b9bf--- a/crates/ui-egui/src/i18n/fr.tsv+++ b/crates/ui-egui/src/i18n/fr.tsv@@@ -3317,15 -3252,4 +3317,16 @@@ curves Smooth LisseUse UtiliserIn Front DevantBehind Derrière++# DDS Options (#1327)+ DDS Options Options DDS+ Compression Compression+ Generate Mipmaps Générer les mipmaps++# Color Table (.act) dialog+ There is no color table to save. Il n’y a aucune table de couleurs à enregistrer.+@plural Saved {n} color to {file}|Saved {n} colors to {file} {n} couleur enregistrée dans {file}|{n} couleurs enregistrées dans {file}++# Graphics Adapter preference (#1885)+ GPU adapter Adaptateur GPU+ Resize Windows to Fit Redimensionner les fenêtresdiff --cc crates/ui-egui/src/i18n/hu.tsvindex 058aef622,25def1f5b..8a6f4fc9c--- a/crates/ui-egui/src/i18n/hu.tsv+++ b/crates/ui-egui/src/i18n/hu.tsv@@@ -4224,14 -4163,4 +4224,15 @@@ cameraRaw Yellow SárgUse HasználatIn Front ElölBehind Mögött++# DDS Options (#1327)+ DDS Options DDS-beállítások+ Generate Mipmaps Mipmapek létrehozása++# Color Table (.act) dialog+ There is no color table to save. Nincs menthető színtábla.+@plural Saved {n} color to {file}|Saved {n} colors to {file} {n} szín mentve ide: {file}++# Graphics Adapter preference (#1885)+ GPU adapter GPU-adapter+ Resize Windows to Fit Ablakok átméretezése a képhezdiff --cc crates/ui-egui/src/i18n/id.tsvindex 8f3772f3b,d75bb4390..d39decf19--- a/crates/ui-egui/src/i18n/id.tsv+++ b/crates/ui-egui/src/i18n/id.tsv@@@ -3304,15 -3239,4 +3304,16 @@@ curves Smooth HaluskaUse GunakanIn Front Di DepanBehind Di Belakang++# DDS Options (#1327)+ DDS Options Opsi DDS+ Compression Kompresi+ Generate Mipmaps Buat mipmap++# Color Table (.act) dialog+ There is no color table to save. Tidak ada tabel warna untuk disimpan.+@plural Saved {n} color to {file}|Saved {n} colors to {file} {n} warna disimpan ke {file}++# Graphics Adapter preference (#1885)+ GPU adapter Adaptor GPU+ Resize Windows to Fit Ubah ukuran jendela agar pasdiff --cc crates/ui-egui/src/i18n/it.tsvindex 39ba2c43d,2437c82ab..a912fe2a5--- a/crates/ui-egui/src/i18n/it.tsv+++ b/crates/ui-egui/src/i18n/it.tsv@@@ -4424,14 -4361,4 +4424,15 @@@ shape Appearance AspettUse UsaIn Front DavantiBehind Dietro++# DDS Options (#1327)+ DDS Options Opzioni DDS+ Generate Mipmaps Genera mipmap++# Color Table (.act) dialog+ There is no color table to save. Non c'è alcuna tabella colori da salvare.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Salvato {n} colore in {file}|Salvati {n} colori in {file}++# Graphics Adapter preference (#1885)+ GPU adapter Adattatore GPU+ Resize Windows to Fit Ridimensiona finestre per adattarediff --cc crates/ui-egui/src/i18n/ja.tsvindex 13b83a8b4,cab60d0cd..c8f5653a0--- a/crates/ui-egui/src/i18n/ja.tsv+++ b/crates/ui-egui/src/i18n/ja.tsv@@@ -3984,15 -3921,4 +3984,16 @@@ curves Smooth スムー�Use 使用In Front 前面Behind 背面++# DDS Options (#1327)+ DDS Options DDS オプション+ Compression 圧縮+ Generate Mipmaps ミップマップを生成++# Color Table (.act) dialog+ There is no color table to save. 保存するカラーテーブルがありません。+@plural Saved {n} color to {file}|Saved {n} colors to {file} {file} に {n} 色を保存しました++# Graphics Adapter preference (#1885)+ GPU adapter GPU アダプター+ Resize Windows to Fit ウィンドウサイズを合わせるdiff --cc crates/ui-egui/src/i18n/ko.tsvindex 83ca15604,a93d9cc8e..fe0a65a6f--- a/crates/ui-egui/src/i18n/ko.tsv+++ b/crates/ui-egui/src/i18n/ko.tsv@@@ -3496,15 -3426,4 +3496,16 @@@ curves Smooth 매끄럽�In Front 앞Behind 뒤Blend 혼합++# DDS Options (#1327)+ DDS Options DDS 옵션+ Compression 압축+ Generate Mipmaps 밉맵 생성++# Color Table (.act) dialog+ There is no color table to save. 저장할 색상표가 없습니다.+@plural Saved {n} color to {file}|Saved {n} colors to {file} {file}에 색상 {n}개 저장++# Graphics Adapter preference (#1885)+ GPU adapter GPU 어댑터+ Resize Windows to Fit 창 크기 맞추기diff --cc crates/ui-egui/src/i18n/nl.tsvindex c790948fc,be897d85d..3d7775730--- a/crates/ui-egui/src/i18n/nl.tsv+++ b/crates/ui-egui/src/i18n/nl.tsv@@@ -4067,14 -4004,4 +4067,15 @@@ curves Smooth Vloeiend makeUse GebruikenIn Front VoorBehind Achter++# DDS Options (#1327)+ DDS Options DDS-opties+ Generate Mipmaps Mipmaps genereren++# Color Table (.act) dialog+ There is no color table to save. Er is geen kleurtabel om op te slaan.+@plural Saved {n} color to {file}|Saved {n} colors to {file} {n} kleur opgeslagen in {file}|{n} kleuren opgeslagen in {file}++# Graphics Adapter preference (#1885)+ GPU adapter GPU-adapter+ Resize Windows to Fit Venstergrootte aanpassendiff --cc crates/ui-egui/src/i18n/pl.tsvindex 6cb153d53,3910c494b..e587da59e--- a/crates/ui-egui/src/i18n/pl.tsv+++ b/crates/ui-egui/src/i18n/pl.tsv@@@ -3906,15 -3843,4 +3906,16 @@@ curves Smooth Wygład�Use UżyjIn Front Z przoduBehind Z tyłu++# DDS Options (#1327)+ DDS Options Opcje DDS+ Compression Kompresja+ Generate Mipmaps Generuj mipmapy++# Color Table (.act) dialog+ There is no color table to save. Brak tabeli kolorów do zapisania.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Zapisano {n} kolor do {file}|Zapisano {n} kolory do {file}|Zapisano {n} kolorów do {file}++# Graphics Adapter preference (#1885)+ GPU adapter Karta GPU+ Resize Windows to Fit Dopasuj rozmiar okiendiff --cc crates/ui-egui/src/i18n/pt-br.tsvindex 7f5f15528,5bd05e1b0..51b3df27e--- a/crates/ui-egui/src/i18n/pt-br.tsv+++ b/crates/ui-egui/src/i18n/pt-br.tsv@@@ -4097,14 -4034,4 +4097,15 @@@ layerLabel No Color Sem coUse UsarIn Front Na frenteBehind Atrás++# DDS Options (#1327)+ DDS Options Opções de DDS+ Generate Mipmaps Gerar mipmaps++# Color Table (.act) dialog+ There is no color table to save. Não há tabela de cores para salvar.+@plural Saved {n} color to {file}|Saved {n} colors to {file} {n} cor salva em {file}|{n} cores salvas em {file}++# Graphics Adapter preference (#1885)+ GPU adapter Adaptador de GPU+ Resize Windows to Fit Redimensionar janelas para caberdiff --cc crates/ui-egui/src/i18n/ru.tsvindex fe4dcfc8a,f640d1a07..0dbc55ec4--- a/crates/ui-egui/src/i18n/ru.tsv+++ b/crates/ui-egui/src/i18n/ru.tsv@@@ -3284,15 -3218,4 +3284,16 @@@ curves Smooth Сгладит�Use ИспользоватьIn Front СпередиBehind Сзади++# DDS Options (#1327)+ DDS Options Параметры DDS+ Compression Сжатие+ Generate Mipmaps Создать MIP-карты++# Color Table (.act) dialog+ There is no color table to save. Нет таблицы цветов для сохранения.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Сохранён {n} цвет в {file}|Сохранены {n} цвета в {file}|Сохранено {n} цветов в {file}++# Graphics Adapter preference (#1885)+ GPU adapter Адаптер GPU+ Resize Windows to Fit Подгонять размер оконdiff --cc crates/ui-egui/src/i18n/sr.tsvindex 28401bbfb,a9dc77550..34ca8fcb1--- a/crates/ui-egui/src/i18n/sr.tsv+++ b/crates/ui-egui/src/i18n/sr.tsv@@@ -4379,14 -4317,4 +4379,15 @@@ shape Appearance IzgleUse KoristiIn Front IspredBehind Iza++# DDS Options (#1327)+ DDS Options DDS opcije+ Generate Mipmaps Generiši mipmape++# Color Table (.act) dialog+ There is no color table to save. Нема табеле боја за чување.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Сачувана је {n} боја у {file}|Сачуване су {n} боје у {file}|Сачувано је {n} боја у {file}++# Graphics Adapter preference (#1885)+ GPU adapter GPU adapter+ Resize Windows to Fit Prilagodi veličinu prozoradiff --cc crates/ui-egui/src/i18n/tr.tsvindex 189cab11e,4ba07eb76..a15354905--- a/crates/ui-egui/src/i18n/tr.tsv+++ b/crates/ui-egui/src/i18n/tr.tsv@@@ -4035,14 -3974,4 +4035,15 @@@ cameraData Lens LenUse KullanIn Front ÖndeBehind Arkada++# DDS Options (#1327)+ DDS Options DDS Seçenekleri+ Generate Mipmaps Mipmap oluştur++# Color Table (.act) dialog+ There is no color table to save. Kaydedilecek renk tablosu yok.+@plural Saved {n} color to {file}|Saved {n} colors to {file} {n} renk {file} konumuna kaydedildi++# Graphics Adapter preference (#1885)+ GPU adapter GPU bağdaştırıcısı+ Resize Windows to Fit Pencereleri sığacak şekilde boyutlandırdiff --cc crates/ui-egui/src/i18n/uk.tsvindex 7dde6e490,52ab13902..ceade5627--- a/crates/ui-egui/src/i18n/uk.tsv+++ b/crates/ui-egui/src/i18n/uk.tsv@@@ -4015,15 -3952,4 +4015,16 @@@ curves Smooth Згладит�Use ВикористатиIn Front СпередуBehind Ззаду++# DDS Options (#1327)+ DDS Options Параметри DDS+ Compression Стиснення+ Generate Mipmaps Створити MIP-карти++# Color Table (.act) dialog+ There is no color table to save. Немає таблиці кольорів для збереження.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Збережено {n} колір у {file}|Збережено {n} кольори у {file}|Збережено {n} кольорів у {file}++# Graphics Adapter preference (#1885)+ GPU adapter Адаптер GPU+ Resize Windows to Fit Підганяти розмір віконdiff --cc crates/ui-egui/src/i18n/vi.tsvindex 4c738957a,b9b790a56..86deaa291--- a/crates/ui-egui/src/i18n/vi.tsv+++ b/crates/ui-egui/src/i18n/vi.tsv@@@ -3797,15 -3731,4 +3797,16 @@@ curves Smooth Làm mượUse DùngIn Front Phía trướcBehind Phía sau++# DDS Options (#1327)+ DDS Options Tùy chọn DDS+ Compression Nén+ Generate Mipmaps Tạo mipmap++# Color Table (.act) dialog+ There is no color table to save. Không có bảng màu nào để lưu.+@plural Saved {n} color to {file}|Saved {n} colors to {file} Đã lưu {n} màu vào {file}++# Graphics Adapter preference (#1885)+ GPU adapter Bộ điều hợp GPU+ Resize Windows to Fit Đổi cỡ cửa sổ cho vừa ảnhdiff --cc crates/ui-egui/src/i18n/zh-hans.tsvindex 0b7088803,aaa46b410..25f62f5e9--- a/crates/ui-egui/src/i18n/zh-hans.tsv+++ b/crates/ui-egui/src/i18n/zh-hans.tsv@@@ -2941,15 -2868,4 +2941,16 @@@ curves Smooth 平�In Front 前面Behind 后面Blend 混合++# DDS Options (#1327)+ DDS Options DDS 选项+ Compression 压缩+ Generate Mipmaps 生成 Mipmap++# Color Table (.act) dialog+ There is no color table to save. 没有可保存的色表。+@plural Saved {n} color to {file}|Saved {n} colors to {file} 已将 {n} 种颜色保存到 {file}++# Graphics Adapter preference (#1885)+ GPU adapter GPU 适配器+ Resize Windows to Fit 调整窗口大小以适合diff --cc crates/ui-egui/src/i18n/zh-hant.tsvindex df4e1411f,b8147c168..ae52c6a21--- a/crates/ui-egui/src/i18n/zh-hant.tsv+++ b/crates/ui-egui/src/i18n/zh-hant.tsv@@@ -2926,15 -2853,4 +2926,16 @@@ curves Smooth 平�In Front 前面Behind 後面Blend 混合++# DDS Options (#1327)+ DDS Options DDS 選項+ Compression 壓縮+ Generate Mipmaps 產生 Mipmap++# Color Table (.act) dialog+ There is no color table to save. 沒有可儲存的色表。+@plural Saved {n} color to {file}|Saved {n} colors to {file} 已將 {n} 種顏色儲存至 {file}++# Graphics Adapter preference (#1885)+ GPU adapter GPU 介面卡+ Resize Windows to Fit 調整視窗大小以符合diff --cc crates/ui-egui/src/lib.rsindex ad61d80c9,7fd4bc420..723eba48d--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@@ -244,9 -237,9 +244,10 @@@ pub mod wide_angle_uipub mod widgets;pub mod work_area;pub mod workspace_ui;+pub mod zoom_hold;pub mod zoom_levels;pub mod zoom_tool;+ pub mod zoom_window_fit;use std::collections::HashMap;use std::sync::mpsc::{Receiver, Sender};diff --cc crates/ui-egui/src/prefs_ui.rsindex 3a6441fe2,ca22b1f03..d962c6edd--- a/crates/ui-egui/src/prefs_ui.rs+++ b/crates/ui-egui/src/prefs_ui.rs@@@ -3918,13 -3624,12 +3918,14 @@@ mod testsassert!(!prefs::is_hidden("enhancedControls.zoomWithTrackpadPinch"));assert!(!prefs::is_hidden("enhancedControls.touchGestures"));assert!(prefs::is_hidden("enhancedControls.scrubbySliderAcceleration"));- // Camera Raw Defaults shows only "Open in Camera Raw" so far.+ // Camera Raw Defaults shows "Open in Camera Raw" and the demosaic method so far.assert!(has_visible_fields(&values, "rawDefaults"));assert!(!prefs::is_hidden("rawDefaults.openInCameraRaw"));+ assert!(!prefs::is_hidden("rawDefaults.demosaic"));assert!(prefs::is_hidden("rawDefaults.applyAutoTone"));assert!(!prefs::is_hidden("general.autoShowHomeScreen"));+ assert!(!prefs::is_hidden("general.animatedZoom"));+ assert!(!prefs::is_hidden("general.zoomResizesWindows"));assert!(!prefs::is_hidden("interface.uiScale"));assert!(!prefs::is_hidden("interface.uiFontSize"));// Hidden values still round-trip through the dialog untouched.