Add fixed UI scale steps from 75% to 300% (#611)

* add 75-300% fixed ui scale steps

* UI scale: French and Indonesian labels for the new steps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* i18n(ko): UI scale steps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sirsyorrz 2026-10-07 23:11:35 +10:00 committed by GitHub
parent d4086ba11a
commit e77325bd4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 61 additions and 7 deletions

View File

@ -58,7 +58,7 @@ choice!(ColorPicker { Adobe = "adobe", System = "system" } default Adobe);
choice!(Theme { Pro = "pro", ProMedium = "proMedium", Studio = "studio", StudioLight = "studioLight", Classic = "classic" } default ProMedium);
choice!(CanvasColor { Default = "default", Black = "black", DarkGray = "darkGray", MediumGray = "mediumGray", LightGray = "lightGray", Custom = "custom" } default Default);
choice!(CanvasBorder { DropShadow = "dropShadow", Line = "line", None = "none" } default DropShadow);
choice!(UiScale { Auto = "auto", P100 = "100", P200 = "200" } default Auto);
choice!(UiScale { Auto = "auto", P75 = "75", P100 = "100", P125 = "125", P150 = "150", P175 = "175", P200 = "200", P250 = "250", P300 = "300" } default Auto);
choice!(
/// Graphics backend of the desktop app's window and GPU canvas (applies at next launch).
/// `auto` lets PhotoCraft pick (DX12 for Intel adapters on Windows); `cpu` composites on the

View File

@ -578,6 +578,12 @@
Fit Artboard on Screen Přizpůsobit kreslicí plochu obrazovce
100% 100 %
200% 200 %
75% 75 %
125% 125 %
150% 150 %
175% 175 %
250% 250 %
300% 300 %
Print Size Velikost tisku
Pixel Aspect Ratio Poměr stran pixelu
Pixel Aspect Ratio Correction Korekce poměru stran pixelu

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -570,6 +570,12 @@
Fit Artboard on Screen Encajar lienzo en pantalla
100% 100%
200% 200%
75% 75%
125% 125%
150% 150%
175% 175%
250% 250%
300% 300%
Print Size Tamaño de impresión
Pixel Aspect Ratio Relación de aspecto de píxel
Pixel Aspect Ratio Correction Corrección de la relación de aspecto de píxel

Can't render this file because it contains an unexpected character in line 4 and column 47.

View File

@ -562,6 +562,12 @@
Fit Artboard on Screen Adapter le plan de travail à l'écran
100% 100 %
200% 200 %
75% 75 %
125% 125 %
150% 150 %
175% 175 %
250% 250 %
300% 300 %
Print Size Taille d'impression
Pixel Aspect Ratio Format des pixels
Pixel Aspect Ratio Correction Correction du format des pixels

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -555,6 +555,12 @@
Fit Artboard on Screen Pas Artboard di Layar
100% 100%
200% 200%
75% 75%
125% 125%
150% 150%
175% 175%
250% 250%
300% 300%
Print Size Ukuran Cetak
Pixel Aspect Ratio Rasio Aspek Piksel
Pixel Aspect Ratio Correction Koreksi Rasio Aspek Piksel

Can't render this file because it contains an unexpected character in line 4 and column 47.

View File

@ -574,6 +574,12 @@
Fit Artboard on Screen アートボードを画面サイズに合わせる
100% 100%
200% 200%
75% 75%
125% 125%
150% 150%
175% 175%
250% 250%
300% 300%
Print Size 印刷サイズ
Pixel Aspect Ratio ピクセル縦横比
Pixel Aspect Ratio Correction ピクセル縦横比を補正

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -2023,3 +2023,11 @@ cameraRaw Color 색상
# Type layer thumbnails (#598)
Edit Type 문자 편집
# UI scale steps (#611)
75% 75%
125% 125%
150% 150%
175% 175%
250% 250%
300% 300%

Can't render this file because it has a wrong number of fields in line 10.

View File

@ -364,6 +364,12 @@
Fit on Screen По размеру экрана
100% 100%
200% 200%
75% 75%
125% 125%
150% 150%
175% 175%
250% 250%
300% 300%
Print Size Размер при печати
Screen Mode Режим экрана
Standard Screen Mode Стандартный режим экрана

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -574,6 +574,12 @@
Fit Artboard on Screen 使画板适合屏幕
100% 100%
200% 200%
75% 75%
125% 125%
150% 150%
175% 175%
250% 250%
300% 300%
Print Size 打印尺寸
Pixel Aspect Ratio 像素长宽比
Pixel Aspect Ratio Correction 像素长宽比校正

Can't render this file because it has a wrong number of fields in line 14.

View File

@ -578,6 +578,12 @@
Fit Artboard on Screen 使工作區域符合螢幕
100% 100%
200% 200%
75% 75%
125% 125%
150% 150%
175% 175%
250% 250%
300% 300%
Print Size 列印尺寸
Pixel Aspect Ratio 像素外觀比例
Pixel Aspect Ratio Correction 像素外觀比例校正

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -160,13 +160,12 @@ fn presets_store(app: &mut PhotocraftApp) {
fn display_scale(pref: prefs::UiScale, native: Option<f32>, monitor_px: Option<egui::Vec2>) -> f32 {
let native = native.filter(|v| v.is_finite() && *v > 0.0).unwrap_or(1.0);
match pref {
prefs::UiScale::P100 => 1.0,
prefs::UiScale::P200 => 2.0,
prefs::UiScale::Auto => {
// A 4K display needs at least 200%; preserve larger system scales.
let is_4k = monitor_px.is_some_and(|s| s.x.is_finite() && s.y.is_finite() && s.x.min(s.y) >= 2160.0 && s.x.max(s.y) >= 3840.0);
if is_4k { native.max(2.0) } else { native }
}
fixed => fixed.name().parse::<f32>().map_or(1.0, |pct| pct / 100.0),
}
}
@ -774,8 +773,7 @@ fn choice_label(v: &str) -> String {
match v {
"cm" => "Centimeters".into(),
"mm" => "Millimeters".into(),
"100" => "100%".into(),
"200" => "200%".into(),
"75" | "100" | "125" | "150" | "175" | "200" | "250" | "300" => format!("{v}%"),
"8" => "8 Bits/Channel".into(),
"16" => "16 Bits/Channel".into(),
"postScript" => "PostScript (72 points/inch)".into(),
@ -1582,7 +1580,7 @@ mod tests {
step(vec2(1920.0, 1080.0), 1.0, 1.0);
step(vec2(3840.0, 2160.0), 1.5, 2.0);
}
for (pref, expected) in [("200", 2.0), ("100", 1.0), ("auto", 1.5)] {
for (pref, expected) in [("200", 2.0), ("125", 1.25), ("150", 1.5), ("100", 1.0), ("auto", 1.5)] {
app.run("prefs.set", json!({"values": {"interface.uiScale": pref}})).unwrap();
let mut input = egui::RawInput::default();
input.viewports.get_mut(&egui::ViewportId::ROOT).unwrap().native_pixels_per_point = Some(1.5);

View File

@ -68,7 +68,7 @@ Edit → Preferences → Interface → UI Scale applies immediately. Auto follow
system's display scale (including fractional scales). For a 4K or larger monitor,
Auto uses at least 200% so text and controls remain readable. Detection uses the current monitor,
including portrait displays, and updates when the window moves between monitors. If monitor
size is unavailable, Auto follows system DPI. The 100% and 200% choices set an absolute UI
size is unavailable, Auto follows system DPI. The fixed choices (75% to 300%) set an absolute UI
scale, allowing large 4K displays to use smaller controls when desired. Canvas zoom shortcuts
continue to control the document independently of UI scaling.