From a9dbe7f879606e70e6c84a42bf061d27e901a0aa Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 21:31:22 -0800 Subject: [PATCH 1/3] =?UTF-8?q?Color:=20Edit=20=E2=80=BA=20Refresh=20Monit?= =?UTF-8?q?or=20Profile=20reads=20the=20display's=20profile=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use Monitor Profile for Canvas reads the display's profile every 10 seconds and when the window moves to another display. The new command view.refreshMonitorProfile (Edit › Refresh Monitor Profile, after Assign Profile…) makes the next frame read it at once, past both the 10-second reading and the 1-second display check. A request made while a reading runs waits for that reading to end and then starts. The command returns {requested: true} before the profile is read, and ui.inspect's displayProfile reports readRequested while the request waits. It is off and returns an error while the preference is off (nothing is queued) and where nothing reads the display's profile (the web build). It changes no document, proof setting or preference. The reading thread now clears its busy flag before it asks for a repaint, and it also asks for one when a request is pending. --- apps/vectorcraft/src/display_profile.rs | 97 ++++++++++++++++++++++--- crates/mcp/src/ui_catalog.rs | 6 ++ crates/ui-egui/src/display_profile.rs | 64 +++++++++++++++- crates/ui-egui/src/i18n/bg.tsv | 1 + crates/ui-egui/src/i18n/bs.tsv | 1 + crates/ui-egui/src/i18n/ca.tsv | 3 + crates/ui-egui/src/i18n/cs.tsv | 3 + crates/ui-egui/src/i18n/da.tsv | 3 + crates/ui-egui/src/i18n/de.tsv | 3 + crates/ui-egui/src/i18n/el.tsv | 3 + crates/ui-egui/src/i18n/es.tsv | 3 + crates/ui-egui/src/i18n/fi.tsv | 3 + crates/ui-egui/src/i18n/fr.tsv | 3 + crates/ui-egui/src/i18n/gu.tsv | 1 + crates/ui-egui/src/i18n/hi.tsv | 3 + crates/ui-egui/src/i18n/hu.tsv | 3 + crates/ui-egui/src/i18n/id.tsv | 1 + crates/ui-egui/src/i18n/it.tsv | 3 + crates/ui-egui/src/i18n/ja.tsv | 3 + crates/ui-egui/src/i18n/ka.tsv | 3 + crates/ui-egui/src/i18n/ko.tsv | 3 + crates/ui-egui/src/i18n/nl.tsv | 3 + crates/ui-egui/src/i18n/pl.tsv | 3 + crates/ui-egui/src/i18n/pt-br.tsv | 3 + crates/ui-egui/src/i18n/ru.tsv | 3 + crates/ui-egui/src/i18n/sv.tsv | 3 + crates/ui-egui/src/i18n/tests.rs | 1 + crates/ui-egui/src/i18n/tr.tsv | 3 + crates/ui-egui/src/i18n/uk.tsv | 3 + crates/ui-egui/src/i18n/vi.tsv | 3 + crates/ui-egui/src/i18n/zh-hans.tsv | 3 + crates/ui-egui/src/i18n/zh-hant.tsv | 3 + crates/ui-egui/src/menus/run.rs | 7 ++ crates/ui-egui/src/menus/state.rs | 1 + crates/ui-egui/src/menus/tests.rs | 24 ++++++ crates/ui-egui/src/menus/tree.rs | 1 + crates/ui-egui/src/menus/ui_commands.rs | 6 ++ docs/mcp.md | 11 ++- docs/target-app-parity.md | 1 + 39 files changed, 281 insertions(+), 14 deletions(-) diff --git a/apps/vectorcraft/src/display_profile.rs b/apps/vectorcraft/src/display_profile.rs index 2be6e27aa5..7236b49d7e 100644 --- a/apps/vectorcraft/src/display_profile.rs +++ b/apps/vectorcraft/src/display_profile.rs @@ -10,7 +10,7 @@ //! - macOS: the window's layer is tagged sRGB and macOS converts it (`mac_color_space`). //! //! While the preference is on, a background thread reads the display every [`EVERY`] seconds, -//! and at once when the window moves to another display. +//! and at once when the window moves to another display or Edit › Refresh Monitor Profile asks. use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; @@ -31,6 +31,8 @@ pub(crate) struct Reader { looked: Option, /// A reading is running. busy: Arc, + /// [`DisplayProfile::attach_reader`] was called. + attached: bool, } /// Clears [`Reader::busy`] when the reading thread ends, also by a panic. @@ -45,22 +47,22 @@ impl Drop for Done { impl Reader { /// Starts a reading when one is due and none is running. `now` is the frame's time in seconds. pub(crate) fn tick(&mut self, window: &winit::window::Window, now: f64, enabled: bool, profile: &DisplayProfile, ctx: &egui::Context) { - if !enabled || self.busy.load(Ordering::Acquire) || self.looked.is_some_and(|at| (at..at + LOOK_EVERY).contains(&now)) { - return; + if !self.attached { + profile.attach_reader(); + self.attached = true; } - self.looked = Some(now); - let display = window.current_monitor().and_then(|m| m.name()); - if !due(self.last.as_ref(), now, display.as_deref()) { + let Some(display) = self.start(now, enabled, profile, || window.current_monitor().and_then(|m| m.name())) else { return; - } - self.last = Some((now, display.clone())); + }; profile.pending(); self.busy.store(true, Ordering::Release); let done = Done(self.busy.clone()); let (profile, ctx) = (profile.clone(), ctx.clone()); let spawned = std::thread::Builder::new().name("display profile".into()).spawn(move || { - let _done = done; - if profile.report(read(display)) { + let changed = profile.report(read(display)); + drop(done); + // A request made while this reading ran starts on the next frame. + if changed || profile.read_requested() { ctx.request_repaint(); } }); @@ -68,6 +70,31 @@ impl Reader { log::warn!("couldn't start reading the display profile: {e}"); } } + + /// The display to read at `now` when a reading is to start, looked up with `display`. A + /// request from Refresh Monitor Profile ([`DisplayProfile::request_read`]) starts one at once, + /// past [`EVERY`] and [`LOOK_EVERY`]; while a reading runs it waits, and with the preference + /// off it is dropped. + fn start(&mut self, now: f64, enabled: bool, profile: &DisplayProfile, display: impl FnOnce() -> Option) -> Option> { + if !enabled { + profile.take_request(); + return None; + } + if self.busy.load(Ordering::Acquire) { + return None; + } + let asked = profile.take_request(); + if !asked && self.looked.is_some_and(|at| (at..at + LOOK_EVERY).contains(&now)) { + return None; + } + self.looked = Some(now); + let display = display(); + if !asked && !due(self.last.as_ref(), now, display.as_deref()) { + return None; + } + self.last = Some((now, display.clone())); + Some(display) + } } /// Whether a reading of `display` is due at `now`, after the last one (`last`): none yet, another @@ -570,6 +597,56 @@ mod tests { assert!(due(Some(&last), 50.0, Some("DP-1"))); } + fn attached() -> DisplayProfile { + let profile = DisplayProfile::default(); + profile.attach_reader(); + profile + } + + #[test] + fn a_requested_reading_starts_on_the_next_frame_past_both_intervals() { + let (mut r, profile) = (Reader::default(), attached()); + let dp1 = || Some("DP-1".to_string()); + assert_eq!(r.start(100.0, true, &profile, dp1), Some(Some("DP-1".into()))); + // Inside the display lookup interval and the reading interval: nothing starts. + assert_eq!(r.start(100.5, true, &profile, || panic!("not looked up")), None); + assert_eq!(r.start(102.0, true, &profile, dp1), None); + profile.request_read(true).unwrap(); + assert_eq!(r.start(102.1, true, &profile, dp1), Some(Some("DP-1".into()))); + assert!(!profile.read_requested(), "the request is taken"); + // The intervals run again from the requested reading. + assert_eq!(r.start(102.2, true, &profile, dp1), None); + assert_eq!(r.start(111.0, true, &profile, dp1), None); + assert_eq!(r.start(113.0, true, &profile, dp1), Some(Some("DP-1".into()))); + } + + #[test] + fn a_request_made_while_a_reading_runs_waits_for_it_to_end() { + let (mut r, profile) = (Reader::default(), attached()); + let dp1 = || Some("DP-1".to_string()); + assert!(r.start(0.0, true, &profile, dp1).is_some()); + r.busy.store(true, Ordering::Release); + profile.request_read(true).unwrap(); + assert_eq!(r.start(0.1, true, &profile, dp1), None); + assert_eq!(r.start(5.0, true, &profile, dp1), None); + assert!(profile.read_requested(), "kept while the reading runs"); + r.busy.store(false, Ordering::Release); + assert_eq!(r.start(5.1, true, &profile, dp1), Some(Some("DP-1".into()))); + assert!(!profile.read_requested()); + } + + #[test] + fn a_request_is_dropped_when_the_preference_goes_off() { + let (mut r, profile) = (Reader::default(), attached()); + let dp1 = || Some("DP-1".to_string()); + assert!(r.start(0.0, true, &profile, dp1).is_some()); + profile.request_read(true).unwrap(); + assert_eq!(r.start(0.1, false, &profile, dp1), None); + assert!(!profile.read_requested()); + assert_eq!(r.start(0.2, true, &profile, dp1), None, "no reading starts later for it"); + assert!(profile.request_read(false).is_err()); + } + #[test] fn wayland_sessions_are_told_apart_from_x11_by_the_environment() { let env = |pairs: &'static [(&'static str, &'static str)]| { diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index ad97330005..99e4e8291e 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -161,6 +161,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ ("app.home", "Home", "", "{} shows the Home screen (new file presets, Open) over the open documents; choosing a document tab returns to it"), ("edit.preferences", "Preferences…", "Cmd+K", "{category?} open Preferences (engine: prefs.get / prefs.set / prefs.list)"), ("edit.keyboardShortcuts", "Keyboard Shortcuts…", "Cmd+Alt+Shift+K", "{}"), + ( + "view.refreshMonitorProfile", + "Refresh Monitor Profile", + "", + "{} read the display's profile for Use Monitor Profile for Canvas (monitorProfileDisplay) again on the next frame, without waiting for the 10-second reading or the 1-second display check; while a reading runs, the request waits for it to end → {requested: true}, before the profile is read (ui.inspect › displayProfile reports the reading, and readRequested while it waits); an error while the preference is off, and where nothing reads the display's profile (the web build)", + ), ( "edit.autoSpellCheck", "Auto Spell Check", diff --git a/crates/ui-egui/src/display_profile.rs b/crates/ui-egui/src/display_profile.rs index b3f10ab27e..a1acf8ebbe 100644 --- a/crates/ui-egui/src/display_profile.rs +++ b/crates/ui-egui/src/display_profile.rs @@ -78,6 +78,10 @@ struct State { transform: Option>, /// The bytes last reported, so a reading of the same profile builds nothing. reported: Option<(Option, Vec)>, + /// The desktop app reads the display's profile ([`DisplayProfile::attach_reader`]). + reader: bool, + /// Refresh Monitor Profile asked for a reading that hasn't started yet. + requested: bool, } impl Default for State { @@ -90,6 +94,8 @@ impl Default for State { reason: Some("this build doesn't read display profiles".into()), transform: None, reported: None, + reader: false, + requested: false, } } } @@ -116,6 +122,42 @@ impl DisplayProfile { } } + /// The desktop app reads the display's profile, so [`Self::request_read`] can ask it to. + pub fn attach_reader(&self) { + self.write().reader = true; + } + + /// Whether something reads the display's profile ([`Self::attach_reader`]). + pub(crate) fn has_reader(&self) -> bool { + self.read().reader + } + + /// Edit › Refresh Monitor Profile: asks the desktop app to read the display's profile again on + /// its next frame, without waiting for its intervals; while a reading runs, the request waits + /// for it to end. Refused while `enabled` (the preference) is off, and when nothing reads the + /// profile. Nothing is queued when it is refused. + pub fn request_read(&self, enabled: bool) -> Result<(), String> { + if !enabled { + return Err("turn on Use Monitor Profile for Canvas first".into()); + } + let mut s = self.write(); + if !s.reader { + return Err("this build doesn't read display profiles".into()); + } + s.requested = true; + Ok(()) + } + + /// Whether [`Self::request_read`] asked for a reading that hasn't started. + pub fn read_requested(&self) -> bool { + self.read().requested + } + + /// Takes the request [`Self::request_read`] made: whether there was one. + pub fn take_request(&self) -> bool { + self.read_requested() && std::mem::take(&mut self.write().requested) + } + /// Takes `reading` in. A profile is checked, and its conversion built, on the calling thread; /// a profile that can't be used leaves the canvas sRGB, with the reason in [`Self::status`]. /// The same profile reported again for the same display changes nothing. Returns whether the @@ -170,8 +212,9 @@ impl DisplayProfile { /// The status `ui.inspect` reports as `displayProfile`: the display, what was found /// (`profile`, `srgbProfile`, `system`, `none`, `pending` or `unsupported`), the profile's - /// description and where it was read from, whether the canvas is converted, why not, and - /// whether the system converts the window. + /// description and where it was read from, whether the canvas is converted, why not, whether + /// the system converts the window, and whether a reading [`Self::request_read`] asked for + /// hasn't started. pub fn status(&self, enabled: bool) -> Value { let s = self.read(); json!({ @@ -183,6 +226,7 @@ impl DisplayProfile { "applied": enabled && s.transform.is_some(), "reason": s.reason, "osManaged": s.kind == Kind::System, + "readRequested": s.requested, }) } @@ -535,6 +579,22 @@ pub(crate) mod tests { assert!(d.key(true) > key); } + #[test] + fn a_reading_is_requested_only_with_the_preference_on_and_a_reader() { + let d = DisplayProfile::default(); + assert_eq!(d.request_read(true).unwrap_err(), "this build doesn't read display profiles"); + d.attach_reader(); + assert_eq!(d.request_read(false).unwrap_err(), "turn on Use Monitor Profile for Canvas first"); + assert!(!d.read_requested() && !d.take_request(), "a refused request is not queued"); + d.request_read(true).unwrap(); + d.request_read(true).unwrap(); + assert_eq!(d.status(true)["readRequested"].as_bool(), Some(true)); + // Two requests before the reading starts make one reading. + assert!(d.take_request()); + assert!(!d.take_request()); + assert_eq!(d.status(true)["readRequested"].as_bool(), Some(false)); + } + #[test] fn a_profile_that_can_t_be_used_leaves_the_canvas_srgb_and_says_why() { let d = DisplayProfile::default(); diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index faf6180840..aafdaf1fb2 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -2724,6 +2724,7 @@ digits Malayalam Малаялам Real World: Реален свят: Real-time Drawing and Editing Чертане и редактиране в реално време Use Monitor Profile for Canvas Използване на профила на монитора за платното + Refresh Monitor Profile Обновяване на профила на монитора The canvas is drawn in sRGB. Платното се изобразява в sRGB. Canvas display profile: Профил на дисплея за платното: The system matches the window to the display's colors. Системата съгласува цветовете на прозореца с дисплея. diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index db9e97f9bc..661054aa8c 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -3975,6 +3975,7 @@ theme Appearance Izgled Printing / Exporting Štampanje / izvoz Real-time Drawing and Editing Crtanje i uređivanje u stvarnom vremenu Use Monitor Profile for Canvas Koristi profil monitora za platno + Refresh Monitor Profile Osvježi profil monitora The canvas is drawn in sRGB. Platno se iscrtava u sRGB-u. Canvas display profile: Profil ekrana za platno: The system matches the window to the display's colors. Sistem prilagođava boje prozora ekranu. diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 1705aa6811..e6c2eca47a 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -3528,6 +3528,9 @@ digits Malayalam Malaiàlam Real World: Món real: Real-time Drawing and Editing Dibuix i edició en temps real Use Monitor Profile for Canvas Utilitza el perfil del monitor per al llenç + Refresh Monitor Profile Actualitza el perfil del monitor +@msg turn on Use Monitor Profile for Canvas first activeu primer «Utilitza el perfil del monitor per al llenç» +@msg this build doesn't read display profiles aquesta versió no llegeix perfils de pantalla The canvas is drawn in sRGB. El llenç es dibuixa en sRGB. Canvas display profile: Perfil de pantalla del llenç: The system matches the window to the display's colors. El sistema ajusta la finestra als colors de la pantalla. diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 3ce4d6f0a5..ce146daccc 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -4080,6 +4080,9 @@ theme Appearance Motiv Printing / Exporting Tisk / export Real-time Drawing and Editing Kreslení a úpravy v reálném čase Use Monitor Profile for Canvas Použít profil monitoru pro plátno + Refresh Monitor Profile Obnovit profil monitoru +@msg turn on Use Monitor Profile for Canvas first nejprve zapněte „Použít profil monitoru pro plátno“ +@msg this build doesn't read display profiles tato verze nečte profily displejů The canvas is drawn in sRGB. Plátno se vykresluje v sRGB. Canvas display profile: Profil displeje pro plátno: The system matches the window to the display's colors. Systém přizpůsobuje okno barvám displeje. diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 69db2c7136..320aff5d47 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -6463,6 +6463,9 @@ theme Appearance Udseende Printing / Exporting Udskrivning / eksport Real-time Drawing and Editing Tegning og redigering i realtid Use Monitor Profile for Canvas Brug skærmprofil til canvas + Refresh Monitor Profile Opdatér skærmprofil +@msg turn on Use Monitor Profile for Canvas first slå først „Brug skærmprofil til canvas“ til +@msg this build doesn't read display profiles denne version læser ikke skærmprofiler The canvas is drawn in sRGB. Canvasset tegnes i sRGB. Canvas display profile: Canvassets skærmprofil: The system matches the window to the display's colors. Systemet tilpasser vinduet til skærmens farver. diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 9adc5e4da1..eb2b43e7ce 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -2772,6 +2772,9 @@ digits Malayalam Malayalam Real World: Reale Welt: Real-time Drawing and Editing Zeichnen und Bearbeiten in Echtzeit Use Monitor Profile for Canvas Monitorprofil für Arbeitsfläche verwenden + Refresh Monitor Profile Monitorprofil aktualisieren +@msg turn on Use Monitor Profile for Canvas first aktivieren Sie zuerst „Monitorprofil für Arbeitsfläche verwenden“ +@msg this build doesn't read display profiles diese Version liest keine Bildschirmprofile The canvas is drawn in sRGB. Die Arbeitsfläche wird in sRGB dargestellt. Canvas display profile: Bildschirmprofil der Arbeitsfläche: The system matches the window to the display's colors. Das System passt das Fenster an die Farben des Bildschirms an. diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 2bb03c51e9..6b0ff86170 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -3635,6 +3635,9 @@ digits Malayalam Μαλαγιάλαμ Real World: Πραγματικός κόσμος: Real-time Drawing and Editing Σχεδίαση και επεξεργασία σε πραγματικό χρόνο Use Monitor Profile for Canvas Χρήση προφίλ οθόνης για τον καμβά + Refresh Monitor Profile Ανανέωση προφίλ οθόνης +@msg turn on Use Monitor Profile for Canvas first ενεργοποιήστε πρώτα τη «Χρήση προφίλ οθόνης για τον καμβά» +@msg this build doesn't read display profiles αυτή η έκδοση δεν διαβάζει προφίλ οθονών The canvas is drawn in sRGB. Ο καμβάς σχεδιάζεται σε sRGB. Canvas display profile: Προφίλ οθόνης καμβά: The system matches the window to the display's colors. Το σύστημα προσαρμόζει το παράθυρο στα χρώματα της οθόνης. diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index fc63c72e93..85da996aef 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -2813,6 +2813,9 @@ digits Malayalam Malayálam Real World: Mundo real: Real-time Drawing and Editing Dibujo y edición en tiempo real Use Monitor Profile for Canvas Usar perfil del monitor para el lienzo + Refresh Monitor Profile Actualizar perfil del monitor +@msg turn on Use Monitor Profile for Canvas first activa primero «Usar perfil del monitor para el lienzo» +@msg this build doesn't read display profiles esta versión no lee perfiles de pantalla The canvas is drawn in sRGB. El lienzo se dibuja en sRGB. Canvas display profile: Perfil de pantalla del lienzo: The system matches the window to the display's colors. El sistema ajusta la ventana a los colores de la pantalla. diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 59aa73a6b8..ea66203f95 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -4004,6 +4004,9 @@ theme Appearance Ulkoasu Printing / Exporting Tulostus / vienti Real-time Drawing and Editing Reaaliaikainen piirto ja muokkaus Use Monitor Profile for Canvas Käytä näytön profiilia kankaalle + Refresh Monitor Profile Päivitä näytön profiili +@msg turn on Use Monitor Profile for Canvas first ota ensin käyttöön ”Käytä näytön profiilia kankaalle” +@msg this build doesn't read display profiles tämä versio ei lue näyttöjen profiileja The canvas is drawn in sRGB. Kangas piirretään sRGB-tilassa. Canvas display profile: Kankaan näyttöprofiili: The system matches the window to the display's colors. Järjestelmä sovittaa ikkunan näytön väreihin. diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 14a0be4478..e111b0079e 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -2801,6 +2801,9 @@ digits Malayalam Malayalam Real World: Monde réel : Real-time Drawing and Editing Dessin et édition en temps réel Use Monitor Profile for Canvas Utiliser le profil du moniteur pour la zone de travail + Refresh Monitor Profile Actualiser le profil du moniteur +@msg turn on Use Monitor Profile for Canvas first activez d’abord « Utiliser le profil du moniteur pour la zone de travail » +@msg this build doesn't read display profiles cette version ne lit pas les profils d’affichage The canvas is drawn in sRGB. La zone de travail est affichée en sRGB. Canvas display profile: Profil d’affichage de la zone de travail : The system matches the window to the display's colors. Le système adapte la fenêtre aux couleurs de l’écran. diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 3d04ff79a9..0462077e3c 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -4498,6 +4498,7 @@ antiAlias Sharp શાર્પ Include Placed Images પ્લેસ કરેલી ઇમેજો સામેલ કરો Include Fill Hatches ફિલ હેચિસ સામેલ કરો Use Monitor Profile for Canvas કેનવાસ માટે મોનિટર પ્રોફાઇલ વાપરો + Refresh Monitor Profile મોનિટર પ્રોફાઇલ તાજી કરો The canvas is drawn in sRGB. કેનવાસ sRGBમાં દોરાય છે. Canvas display profile: કેનવાસ ડિસ્પ્લે પ્રોફાઇલ: The system matches the window to the display's colors. સિસ્ટમ વિન્ડોના રંગો ડિસ્પ્લેના રંગો સાથે મેળવે છે. diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 447b652288..98afcd8a84 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -3871,6 +3871,9 @@ antiAlias Sharp शार्प Real World: रियल वर्ल्ड: Real-time Drawing and Editing रियल टाइम ड्राइंग और संपादन Use Monitor Profile for Canvas कैनवास के लिए मॉनिटर प्रोफ़ाइल का उपयोग करें + Refresh Monitor Profile मॉनिटर प्रोफ़ाइल रिफ्रेश करें +@msg turn on Use Monitor Profile for Canvas first पहले "कैनवास के लिए मॉनिटर प्रोफ़ाइल का उपयोग करें" चालू करें +@msg this build doesn't read display profiles यह बिल्ड डिस्प्ले प्रोफ़ाइल नहीं पढ़ता The canvas is drawn in sRGB. कैनवास sRGB में बनाया जाता है। Canvas display profile: कैनवास की डिस्प्ले प्रोफ़ाइल: The system matches the window to the display's colors. सिस्टम विंडो को डिस्प्ले के रंगों से मिलाता है। diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index e081c882b6..691982d48e 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -3383,6 +3383,9 @@ mark-style Japanese Japán Real World: Valós méret: Real-time Drawing and Editing Valós idejű rajzolás és szerkesztés Use Monitor Profile for Canvas Monitorprofil használata a vászonhoz + Refresh Monitor Profile Monitorprofil frissítése +@msg turn on Use Monitor Profile for Canvas first előbb kapcsolja be a „Monitorprofil használata a vászonhoz” beállítást +@msg this build doesn't read display profiles ez a változat nem olvassa be a kijelzőprofilokat The canvas is drawn in sRGB. A vászon sRGB-ben jelenik meg. Canvas display profile: A vászon kijelzőprofilja: The system matches the window to the display's colors. A rendszer a kijelző színeihez igazítja az ablakot. diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 9f27f50e03..59bc8e8acb 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -3740,6 +3740,7 @@ theme Appearance Tampilan Printing / Exporting Pencetakan / Ekspor Real-time Drawing and Editing Penggambaran dan pengeditan waktu nyata Use Monitor Profile for Canvas Gunakan profil monitor untuk kanvas + Refresh Monitor Profile Segarkan profil monitor The canvas is drawn in sRGB. Kanvas digambar dalam sRGB. Canvas display profile: Profil layar kanvas: The system matches the window to the display's colors. Sistem menyesuaikan jendela dengan warna layar. diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index b294b7da3a..8dd80b289c 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -2853,6 +2853,9 @@ digits Malayalam Malayalam Real World: Mondo reale: Real-time Drawing and Editing Disegno e modifica in tempo reale Use Monitor Profile for Canvas Usa il profilo del monitor per l'area di disegno + Refresh Monitor Profile Aggiorna profilo del monitor +@msg turn on Use Monitor Profile for Canvas first attiva prima «Usa il profilo del monitor per l'area di disegno» +@msg this build doesn't read display profiles questa versione non legge i profili dei display The canvas is drawn in sRGB. L'area di disegno è visualizzata in sRGB. Canvas display profile: Profilo del display per l'area di disegno: The system matches the window to the display's colors. Il sistema adatta la finestra ai colori del display. diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 56c1c1e5ec..971465d5ea 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -2876,6 +2876,9 @@ mark-style Japanese 日本式 Real World: 実寸: Real-time Drawing and Editing リアルタイム描画および編集 Use Monitor Profile for Canvas キャンバスにモニタープロファイルを使用 + Refresh Monitor Profile モニタープロファイルを更新 +@msg turn on Use Monitor Profile for Canvas first 先に「キャンバスにモニタープロファイルを使用」をオンにしてください +@msg this build doesn't read display profiles このビルドはディスプレイプロファイルを読み込みません The canvas is drawn in sRGB. キャンバスは sRGB で描画されます。 Canvas display profile: キャンバスのディスプレイプロファイル: The system matches the window to the display's colors. システムがウィンドウをディスプレイのカラーに合わせます。 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 0f18e63a1a..f050620f3c 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -5718,6 +5718,9 @@ theme Appearance იერსახე Printing / Exporting ბეჭდვა / ექსპორტირება Real-time Drawing and Editing რეალურ დროში ხატვა და რედაქტირება Use Monitor Profile for Canvas მონიტორის პროფილის გამოყენება ტილოსთვის + Refresh Monitor Profile მონიტორის პროფილის განახლება +@msg turn on Use Monitor Profile for Canvas first ჯერ ჩართეთ „მონიტორის პროფილის გამოყენება ტილოსთვის“ +@msg this build doesn't read display profiles ეს ვერსია ეკრანის პროფილებს არ კითხულობს The canvas is drawn in sRGB. ტილო sRGB-ში იხატება. Canvas display profile: ტილოს ეკრანის პროფილი: The system matches the window to the display's colors. სისტემა ფანჯარას ეკრანის ფერებს უსადაგებს. diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 8e5a3799a5..64e99d79b1 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -2866,6 +2866,9 @@ mark-style Japanese 일본식 Real World: 실제 크기: Real-time Drawing and Editing 실시간 그리기 및 편집 Use Monitor Profile for Canvas 캔버스에 모니터 프로필 사용 + Refresh Monitor Profile 모니터 프로필 새로 고침 +@msg turn on Use Monitor Profile for Canvas first 먼저 "캔버스에 모니터 프로필 사용"을 켜세요 +@msg this build doesn't read display profiles 이 빌드는 디스플레이 프로필을 읽지 않습니다 The canvas is drawn in sRGB. 캔버스는 sRGB로 그려집니다. Canvas display profile: 캔버스 디스플레이 프로필: The system matches the window to the display's colors. 시스템이 창을 디스플레이 색상에 맞춥니다. diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 96e9e6a985..d930b5d292 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -4357,6 +4357,9 @@ theme Appearance Vormgeving Printing / Exporting Afdrukken / exporteren Real-time Drawing and Editing Tekenen en bewerken in realtime Use Monitor Profile for Canvas Monitorprofiel gebruiken voor canvas + Refresh Monitor Profile Monitorprofiel vernieuwen +@msg turn on Use Monitor Profile for Canvas first schakel eerst 'Monitorprofiel gebruiken voor canvas' in +@msg this build doesn't read display profiles deze versie leest geen beeldschermprofielen The canvas is drawn in sRGB. Het canvas wordt in sRGB getekend. Canvas display profile: Weergaveprofiel van het canvas: The system matches the window to the display's colors. Het systeem stemt het venster af op de kleuren van het scherm. diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 487283e406..ee2d0a116e 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -3943,6 +3943,9 @@ theme Appearance Wygląd Printing / Exporting Drukowanie / eksportowanie Real-time Drawing and Editing Rysowanie i edycja w czasie rzeczywistym Use Monitor Profile for Canvas Użyj profilu monitora dla płótna + Refresh Monitor Profile Odśwież profil monitora +@msg turn on Use Monitor Profile for Canvas first najpierw włącz „Użyj profilu monitora dla płótna” +@msg this build doesn't read display profiles ta wersja nie odczytuje profili wyświetlaczy The canvas is drawn in sRGB. Płótno jest rysowane w sRGB. Canvas display profile: Profil wyświetlacza płótna: The system matches the window to the display's colors. System dopasowuje okno do kolorów wyświetlacza. diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index e1a8bcb11c..041e438e08 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -2329,6 +2329,9 @@ digits Malayalam Malaiala Real World: Mundo Real: Real-time Drawing and Editing Desenho e Edição em Tempo Real Use Monitor Profile for Canvas Usar Perfil do Monitor para a Tela + Refresh Monitor Profile Atualizar Perfil do Monitor +@msg turn on Use Monitor Profile for Canvas first ative primeiro "Usar Perfil do Monitor para a Tela" +@msg this build doesn't read display profiles esta versão não lê perfis de monitor The canvas is drawn in sRGB. A tela é desenhada em sRGB. Canvas display profile: Perfil do monitor para a tela: The system matches the window to the display's colors. O sistema ajusta a janela às cores do monitor. diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index f443922dd7..bf4e6e0346 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -2842,6 +2842,9 @@ digits Malayalam Малаялам Real World: Реальный мир: Real-time Drawing and Editing Рисование и редактирование в реальном времени Use Monitor Profile for Canvas Использовать профиль монитора для холста + Refresh Monitor Profile Обновить профиль монитора +@msg turn on Use Monitor Profile for Canvas first сначала включите «Использовать профиль монитора для холста» +@msg this build doesn't read display profiles эта сборка не читает профили дисплеев The canvas is drawn in sRGB. Холст отображается в sRGB. Canvas display profile: Профиль дисплея для холста: The system matches the window to the display's colors. Система согласует цвета окна с дисплеем. diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index f4277b7fd6..9067a0ded3 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -2744,6 +2744,9 @@ digits Malayalam Malayalam Real World: Verkligt mått: Real-time Drawing and Editing Ritning och redigering i realtid Use Monitor Profile for Canvas Använd skärmprofil för arbetsytan + Refresh Monitor Profile Uppdatera skärmprofil +@msg turn on Use Monitor Profile for Canvas first slå först på ”Använd skärmprofil för arbetsytan” +@msg this build doesn't read display profiles den här versionen läser inte skärmprofiler The canvas is drawn in sRGB. Arbetsytan ritas i sRGB. Canvas display profile: Arbetsytans skärmprofil: The system matches the window to the display's colors. Systemet anpassar fönstret till skärmens färger. diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 33a6584e3b..7b6d9c4d3e 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -505,6 +505,7 @@ fn monitor_profile_labels_are_in_complete_catalogs() { for lang in LANGUAGES.iter().filter(|lang| lang.complete_menus) { for label in [ "Use Monitor Profile for Canvas", + "Refresh Monitor Profile", "The canvas is drawn in sRGB.", "Canvas display profile:", "The system matches the window to the display's colors.", diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index afd8cdce9a..c92136ab86 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -2584,6 +2584,9 @@ digits Malayalam Malayalam Real World: Gerçek Dünya: Real-time Drawing and Editing Gerçek Zamanlı Çizim ve Düzenleme Use Monitor Profile for Canvas Tuval için Monitör Profilini Kullan + Refresh Monitor Profile Monitör Profilini Yenile +@msg turn on Use Monitor Profile for Canvas first önce "Tuval için Monitör Profilini Kullan" seçeneğini açın +@msg this build doesn't read display profiles bu sürüm ekran profillerini okumaz The canvas is drawn in sRGB. Tuval sRGB olarak çizilir. Canvas display profile: Tuvalin ekran profili: The system matches the window to the display's colors. Sistem pencereyi ekranın renklerine uyarlar. diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 682edcbd4b..1e03827986 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -2845,6 +2845,9 @@ digits Malayalam Малаялам Real World: Реальний світ: Real-time Drawing and Editing Малювання та редагування у реальному часі Use Monitor Profile for Canvas Використовувати профіль монітора для полотна + Refresh Monitor Profile Оновити профіль монітора +@msg turn on Use Monitor Profile for Canvas first спочатку увімкніть «Використовувати профіль монітора для полотна» +@msg this build doesn't read display profiles ця збірка не читає профілі дисплеїв The canvas is drawn in sRGB. Полотно відображається в sRGB. Canvas display profile: Профіль дисплея для полотна: The system matches the window to the display's colors. Система узгоджує кольори вікна з дисплеєм. diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 7cbc02163d..3dc4c61095 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -3169,6 +3169,9 @@ mark-style Japanese Kiểu Nhật Real World: Thực tế: Real-time Drawing and Editing Vẽ và chỉnh sửa theo thời gian thực Use Monitor Profile for Canvas Dùng hồ sơ màn hình cho vùng vẽ + Refresh Monitor Profile Làm mới hồ sơ màn hình +@msg turn on Use Monitor Profile for Canvas first hãy bật "Dùng hồ sơ màn hình cho vùng vẽ" trước +@msg this build doesn't read display profiles bản dựng này không đọc hồ sơ màn hình The canvas is drawn in sRGB. Vùng vẽ được hiển thị ở sRGB. Canvas display profile: Hồ sơ màn hình của vùng vẽ: The system matches the window to the display's colors. Hệ thống điều chỉnh cửa sổ theo màu của màn hình. diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index b445c6b44f..b29eb9b505 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -2707,6 +2707,9 @@ digits Malayalam 马拉雅拉姆数字 Real World: 真实世界: Real-time Drawing and Editing 实时绘图和编辑 Use Monitor Profile for Canvas 画布使用显示器配置文件 + Refresh Monitor Profile 刷新显示器配置文件 +@msg turn on Use Monitor Profile for Canvas first 请先打开“画布使用显示器配置文件” +@msg this build doesn't read display profiles 此版本不读取显示器配置文件 The canvas is drawn in sRGB. 画布以 sRGB 绘制。 Canvas display profile: 画布显示配置文件: The system matches the window to the display's colors. 系统会使窗口匹配显示器的颜色。 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 6f8e18baf0..b85408d61a 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -3980,6 +3980,9 @@ digits Malayalam 馬來亞拉姆數字 Real World: 真實世界: Real-time Drawing and Editing 即時繪圖與編輯 Use Monitor Profile for Canvas 畫布使用顯示器描述檔 + Refresh Monitor Profile 重新整理顯示器描述檔 +@msg turn on Use Monitor Profile for Canvas first 請先開啟「畫布使用顯示器描述檔」 +@msg this build doesn't read display profiles 此版本不讀取顯示器描述檔 The canvas is drawn in sRGB. 畫布以 sRGB 繪製。 Canvas display profile: 畫布顯示描述檔: The system matches the window to the display's colors. 系統會讓視窗符合顯示器的色彩。 diff --git a/crates/ui-egui/src/menus/run.rs b/crates/ui-egui/src/menus/run.rs index 495e606d6c..82b4c6bd8c 100644 --- a/crates/ui-egui/src/menus/run.rs +++ b/crates/ui-egui/src/menus/run.rs @@ -261,6 +261,13 @@ fn run_ui_part2(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option app.display_profile.request_read(app.session.prefs.monitor_profile_display).map(|()| { + if let Some(ctx) = &app.ui_ctx { + ctx.request_repaint(); + } + json!({ "requested": true }) + }), // Outline or Preview is a setting of the active document's view. "view.outline" => match app.view_mut() { Some(v) => flag(&mut v.outline), diff --git a/crates/ui-egui/src/menus/state.rs b/crates/ui-egui/src/menus/state.rs index d4dda4698b..da9a4f4822 100644 --- a/crates/ui-egui/src/menus/state.rs +++ b/crates/ui-egui/src/menus/state.rs @@ -321,6 +321,7 @@ pub fn enabled(app: &VectorcraftApp, id: &str) -> bool { "file.exportSelection" => app.session.active().is_some_and(|d| !d.selection.is_empty()), "css.copy" | "css.exportFile" => app.session.active().is_some(), "print.printerSetup" => app.services.print.as_ref().is_some_and(|s| s.has_setup()), + "view.refreshMonitorProfile" => app.session.prefs.monitor_profile_display && app.display_profile.has_reader(), "plugin.dialog" => app.session.active().is_some(), "ui.perspectiveGridDialog" | "ui.savePerspectivePreset" => app.session.active().is_some(), id if id.starts_with(crate::dialogs::perspective_presets::SLOT) => { diff --git a/crates/ui-egui/src/menus/tests.rs b/crates/ui-egui/src/menus/tests.rs index 1bb152292e..b8262accb1 100644 --- a/crates/ui-egui/src/menus/tests.rs +++ b/crates/ui-egui/src/menus/tests.rs @@ -546,6 +546,30 @@ fn color_settings_and_assign_profile_show_the_separations_panel() { } } +/// Edit › Refresh Monitor Profile, after Assign Profile…, asks the desktop app's next frame to read +/// the display's profile; it is off and refused with the preference off or nothing to read it. +#[test] +fn refresh_monitor_profile_asks_for_a_reading_of_the_display_profile() { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), crate::Services::default()); + let entries = menu_entries(&app); + let at = |label: &str| entries.iter().position(|e| e.label == label && e.path == ["Edit"]); + assert_eq!(at("Refresh Monitor Profile"), at("Assign Profile…").map(|i| i + 1)); + let e = &entries[at("Refresh Monitor Profile").unwrap()]; + assert_eq!((e.command.as_deref(), e.shortcut.as_str()), (Some("view.refreshMonitorProfile"), "")); + // Nothing reads the display's profile (the web build, tests). + assert!(!enabled(&app, "view.refreshMonitorProfile")); + assert_eq!(app.run("view.refreshMonitorProfile", json!({})).unwrap_err(), "this build doesn't read display profiles"); + app.display_profile.attach_reader(); + assert!(enabled(&app, "view.refreshMonitorProfile")); + assert_eq!(app.run("view.refreshMonitorProfile", json!({})).unwrap(), json!({"requested": true})); + assert!(app.display_profile.take_request()); + // With the preference off nothing is asked for. + app.session.prefs.monitor_profile_display = false; + assert!(!enabled(&app, "view.refreshMonitorProfile")); + assert_eq!(app.run("view.refreshMonitorProfile", json!({})).unwrap_err(), "turn on Use Monitor Profile for Canvas first"); + assert!(!app.display_profile.read_requested()); +} + #[test] fn saved_views_store_and_restore_the_view() { let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), crate::Services::default()); diff --git a/crates/ui-egui/src/menus/tree.rs b/crates/ui-egui/src/menus/tree.rs index ec8ec99018..c59cb63ce8 100644 --- a/crates/ui-egui/src/menus/tree.rs +++ b/crates/ui-egui/src/menus/tree.rs @@ -141,6 +141,7 @@ pub fn menu_tree_named(english_names: bool) -> Vec<(&'static str, Vec)> { Sep, c("Color Settings…", "edit.colorSettings"), c("Assign Profile…", "edit.assignProfile"), + c("Refresh Monitor Profile", "view.refreshMonitorProfile"), Sep, c("Keyboard Shortcuts…", "edit.keyboardShortcuts"), c("Preferences…", "edit.preferences"), diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index c30c1bfcbb..eba956901d 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -162,6 +162,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ ("app.home", "Home", "", "{} shows the Home screen (new file presets, Open) over the open documents; choosing a document tab returns to it"), ("edit.preferences", "Preferences…", "Cmd+K", "{category?} open Preferences (engine: prefs.get / prefs.set / prefs.list)"), ("edit.keyboardShortcuts", "Keyboard Shortcuts…", "Cmd+Alt+Shift+K", "{}"), + ( + "view.refreshMonitorProfile", + "Refresh Monitor Profile", + "", + "{} read the display's profile for Use Monitor Profile for Canvas (monitorProfileDisplay) again on the next frame, without waiting for the 10-second reading or the 1-second display check; while a reading runs, the request waits for it to end → {requested: true}, before the profile is read (ui.inspect › displayProfile reports the reading, and readRequested while it waits); an error while the preference is off, and where nothing reads the display's profile (the web build)", + ), ( "edit.autoSpellCheck", "Auto Spell Check", diff --git a/docs/mcp.md b/docs/mcp.md index 74ea95519a..d826481a9d 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -6821,13 +6821,20 @@ output's `_ICC_PROFILE` property when colord has no usable profile, then the scr Color on (HDR or Automatic Color Management) and macOS windows are converted by the system, and nothing is converted again. In a Wayland session, and where no profile is set or the profile is not an RGB display profile of at most 1 MiB, the canvas stays sRGB. The app reads the display again every 10 seconds and when the window moves to another display. +Edit › Refresh Monitor Profile (`view.refreshMonitorProfile`, `{}`; a desktop UI command) reads it again on the next +frame without waiting for either interval, for example after a new profile is installed for the display; a request +made while a reading runs starts when that reading ends. It returns `{requested: true}` before the profile is read, +and is an error while `monitorProfileDisplay` is off (nothing is queued) and where nothing reads the display's profile +(the web build). It changes no document, proof setting or preference and records no undo step; reading the same +profile again leaves the canvas as it is. Exports, `ui.render`, the document, panels and thumbnails are not converted; with Proof Colors on, the proof is drawn first and then converted. Translucent art and the antialiased edges of art over an artboard's paper or the transparency grid are blended with it in sRGB, and the blend is converted; over the pasteboard and in Outline the art is converted on its own. `ui.inspect` returns `displayProfile`: `{enabled, display, source, profile, from, applied, reason, -osManaged}`, where `source` is `profile`, `srgbProfile` (a profile that shows sRGB unchanged), `system`, `none`, -`pending` or `unsupported`, `applied` says whether the canvas is converted, and `reason` says why not. +osManaged, readRequested}`, where `source` is `profile`, `srgbProfile` (a profile that shows sRGB unchanged), `system`, `none`, +`pending` or `unsupported`, `applied` says whether the canvas is converted, `reason` says why not, and `readRequested` +says whether a reading Refresh Monitor Profile asked for has not started yet. `ctrlWheelScrollsSideways` (on by default): on, Cmd/Ctrl with a mouse wheel's whole notches scrolls the canvas sideways instead of zooming while `zoomWithMouseWheel` is off; off, Cmd/Ctrl-wheel zooms about the pointer. Alt + Cmd/Ctrl-wheel diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index cc4082ad68..46043e4d8c 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -779,6 +779,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - **Document Setup › Color:** a Color tab shows the document color mode (RGB Color or CMYK Color), a Convert to CMYK or Convert to RGB box for a mode change (cleared: the colors keep their numbers), and the RGB and CMYK profiles assigned to the document, with a working-space entry for none. OK runs `edit.assignProfile` and then `file.documentColorMode` with the dialog's other changes in one `command.batch`, and the document's changes are one undo step. An unchanged Color tab adds no color commands, and Cancel, or OK with nothing changed, records no undo step. A Color tab field with a value of the wrong kind is an error, and the dialog stays open. The tab is VectorCraft's own layout; File › Document Color Mode and Edit › Assign Profile… stay as they are. Tests in `dialogs/document_setup.rs`. - **Assign Profile's three choices:** the Assign rows of Edit › Assign Profile… (the Separations panel's Color Settings section) offer Don't Color Manage This Document, the working space of the document's color mode (Working RGB or Working CMYK, with its name) and Profile with the other profiles of that kind, as [Assign or remove a color profile](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=150) lists them. They act on the profile of the document's color mode: an RGB document's RGB profile, a CMYK document's CMYK profile; the other model's profile stays as it is (VectorCraft's own rule; Document Setup › Color sets both). Picking the working space assigns its profile, which stays when the working space changes later. A choice the document already has runs nothing. Tests in `panels/separations.rs`. - **Canvas through the display's profile on Windows and X11:** Preferences › Performance › Use Monitor Profile for Canvas (on by default) converts the canvas's art, artboard paper and transparency grid from sRGB into the ICC profile of the display that shows most of the main window, after any proof, as the help page describes the monitor's profile translating the document's colors for the monitor ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=151)). Windows gives the display's default profile, and a display with Advanced Color on is left to Windows ([Microsoft Learn](https://learn.microsoft.com/en-us/windows/win32/wcs/advanced-color-icc-profiles)); X11 gives colord's profile for the output or the `_ICC_PROFILE` property. macOS converts the window itself, and a Wayland session stays sRGB. `ui.inspect` reports `displayProfile`. Tests in `color/src/cms/display.rs`, `ui-egui/src/display_profile.rs` and `canvas::tests::the_canvas_is_drawn_through_the_display_profile_while_the_preference_is_on`. +- **Refresh Monitor Profile:** Edit › Refresh Monitor Profile (`view.refreshMonitorProfile`), VectorCraft's own command, reads the display's profile again on the next frame instead of waiting up to 10 seconds, so a profile installed or changed while the app runs is used without a restart; a request made while a reading runs starts when it ends, and the command is off while Use Monitor Profile for Canvas is off. `ui.inspect`'s `displayProfile.readRequested` reports a request that hasn't started. Tests `display_profile::tests::a_requested_reading_starts_on_the_next_frame_past_both_intervals`, `a_request_made_while_a_reading_runs_waits_for_it_to_end`, `a_request_is_dropped_when_the_preference_goes_off` (desktop app) and `menus::tests::refresh_monitor_profile_asks_for_a_reading_of_the_display_profile`. - **Translucent art blended before the display profile:** with Use Monitor Profile for Canvas converting, translucent art and the anti-aliased edges of art over an artboard's paper, a colored artboard or the transparency grid are blended with it in sRGB and the blend is converted, so the monitor's profile translates the document's colors as they are composited ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=151)). The frame rendered whole, the part an edit renders again, the render worker's frame, the pan fill and the other windows' panes do the same; over the pasteboard and in Outline the art is converted on its own, and with no profile to convert into nothing changes. Tests `display_profile::tests::translucent_pixels_over_the_paper_are_blended_before_they_are_converted`, `the_transparency_grid_is_blended_cell_by_cell`, `the_backdrop_is_found_through_the_view` and `canvas::tests::translucent_art_over_the_paper_is_blended_before_the_display_profile`. - **Out-of-gamut warning after a profile change:** the out-of-gamut warning and its closest-color correction in the Color panel and Color Picker ([the help page](https://helpx.adobe.com/illustrator/using/adjusting-colors.html)) check the color against the document's assigned CMYK profile, else the working CMYK space, and update when Edit › Assign Profile… or Edit › Color Settings… changes that space or a loaded profile changes, without a change of color. Which CMYK space the warning uses is VectorCraft's own rule. Tests: `gamut_warning_follows_a_profile_change` and `gamut_warning_follows_a_profile_loaded_again` in `dialogs/color_picker/tests.rs`. - **Assign Profile and the working spaces:** Edit › Assign Profile… tags the document and leaves the working spaces of Edit › Color Settings… as they are, in Color Settings, the Separations panel and the settings saved for the next start. Colors show and convert through the profiles assigned; a change in Color Settings keeps the profiles the document in front is assigned in use, and removing an assigned profile in use puts the working space back in its place. The profiles in use follow the document in front: a new, opened or reverted document, a switch to another tab, a close, Undo and Redo of Assign Profile, a failed batch, each step of a batch, Export All Open and the update of placed documents put that document's profiles in use, and the working spaces where it is assigned none or no document is open. With Window › Arrange › Tile or floating document windows, each document behind the front one draws its art, paper and transparency grid through its own assigned profiles, and loading or removing a profile redraws the documents assigned it; placed documents inside it still draw through the front document's profiles. How documents behind the front one draw is VectorCraft's own rule. View › Proof Setup › Working CMYK simulates the working CMYK space of Color Settings in Proof Colors and Separations Preview, also in a document assigned another CMYK profile. Public references: [Changing the color profile for a document and About color working spaces](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=150) and [Soft-proof presets](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=134). Tests in `engine/tests/color_settings.rs`. From 3a42ec21680146f20e12e1c9594306af6b080544 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 18:28:55 -0800 Subject: [PATCH 2/3] =?UTF-8?q?i18n:=20French=20Use=20Monitor=20Profile=20?= =?UTF-8?q?message=20has=20no-break=20spaces=20inside=20=C2=AB=20=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The row for "turn on Use Monitor Profile for Canvas first" had ordinary spaces after « and before »; it now uses U+00A0 like the other guillemets in fr.tsv. --- crates/ui-egui/src/i18n/fr.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 90e64e4899..0ed252f1cc 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -2836,7 +2836,7 @@ digits Malayalam Malayalam Real-time Drawing and Editing Dessin et édition en temps réel Use Monitor Profile for Canvas Utiliser le profil du moniteur pour la zone de travail Refresh Monitor Profile Actualiser le profil du moniteur -@msg turn on Use Monitor Profile for Canvas first activez d’abord « Utiliser le profil du moniteur pour la zone de travail » +@msg turn on Use Monitor Profile for Canvas first activez d’abord « Utiliser le profil du moniteur pour la zone de travail » @msg this build doesn't read display profiles cette version ne lit pas les profils d’affichage The canvas is drawn in sRGB. La zone de travail est affichée en sRGB. Canvas display profile: Profil d’affichage de la zone de travail : From f2a48d2a3088159e233f6b8bf5f07ef15ae6ffcc Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 18:39:01 -0800 Subject: [PATCH 3/3] Color: Refresh Monitor Profile's reader doc says when a request is dropped A frame that finds Use Monitor Profile for Canvas off drops a waiting request; a request made with the preference on is kept when the preference goes off and on again between two frames. --- apps/vectorcraft/src/display_profile.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/vectorcraft/src/display_profile.rs b/apps/vectorcraft/src/display_profile.rs index 7236b49d7e..ee35a407a7 100644 --- a/apps/vectorcraft/src/display_profile.rs +++ b/apps/vectorcraft/src/display_profile.rs @@ -73,8 +73,9 @@ impl Reader { /// The display to read at `now` when a reading is to start, looked up with `display`. A /// request from Refresh Monitor Profile ([`DisplayProfile::request_read`]) starts one at once, - /// past [`EVERY`] and [`LOOK_EVERY`]; while a reading runs it waits, and with the preference - /// off it is dropped. + /// past [`EVERY`] and [`LOOK_EVERY`]; while a reading runs it waits, and a frame that finds the + /// preference off drops it. A request made with the preference on is kept when the preference + /// goes off and on again between two frames. fn start(&mut self, now: f64, enabled: bool, profile: &DisplayProfile, display: impl FnOnce() -> Option) -> Option> { if !enabled { profile.take_request();