Merge approved PhotoCraft PR #4890: Add scrollbar visibility preferences (#3262)

Port behavior and regression coverage into current modules; preserve current upstream behavior.
Port visibility preference, choice registration, live panel style and canvas override. Keep current animated camera and toolbar exclusions. Relocate misplaced persistence regression to prefs tests; retain current parity score counts.
This commit is contained in:
FredApps committed 2026-10-29 06:09:52 +01:00
commit 1daf3bc079
32 files changed
+175 -4

No files matched your search

@@ -160,6 +160,7 @@ fn selection_transparency_lock_and_mask_targets_apply_to_all_passes() {
assert!(s.active().unwrap().doc.layer(s.active().unwrap().active_layer.unwrap()).unwrap().surface().unwrap().content_bounds().is_empty());
}
#[test]
fn streaming_across_dual_axes_keeps_one_opacity_and_matches_commit() {
let points = [[40.0, 30.0], [40.0, 20.0], [35.0, 20.0], [45.0, 40.0]];
+4
View File
@@ -84,6 +84,7 @@ choice!(
LinuxDisplayServer { Auto = "auto", X11 = "x11" } default Auto
);
choice!(UiFontSize { Tiny = "tiny", Small = "small", Medium = "medium", Large = "large" } default Small);
choice!(ScrollbarVisibility { Default = "default", Always = "always", AutoHide = "autoHide", Hidden = "hidden" } default Default);
choice!(LogDestination { Metadata = "metadata", TextFile = "textFile", Both = "both" } default Metadata);
choice!(LogDetail { SessionsOnly = "sessionsOnly", Concise = "concise", Detailed = "detailed" } default Concise);
choice!(Ask { Always = "always", Never = "never", Ask = "ask" } default Always);
@@ -279,6 +280,8 @@ pub struct Interface {
/// Command ids and the control protocol stay English.
pub language: String,
pub ui_font_size: UiFontSize,
/// Default follows the theme; other modes apply to panel and canvas scrollbars (#3262).
pub scrollbar_visibility: ScrollbarVisibility,
pub show_channels_in_color: bool,
pub dynamic_color_sliders: bool,
/// Draw menu item colours set with Edit › Menus.
@@ -324,6 +327,7 @@ impl Default for Interface {
ui_scale: UiScale::Auto,
language: "auto".into(),
ui_font_size: UiFontSize::Small,
scrollbar_visibility: ScrollbarVisibility::Default,
show_channels_in_color: false,
dynamic_color_sliders: true,
show_menu_colors: true,
+20
View File
@@ -1033,3 +1033,23 @@ fn a_wrongly_typed_section_or_colour_setting_resets_only_that_part() {
assert!(s.load_prefs_json(&deep).is_ok());
assert!(s.load_prefs_json(r#"{"interface": {"theme": 3, "uiScale": [1]}, "workspaces": {"x": 1}, "menus": 1}"#).is_ok());
}
#[test]
fn scrollbar_visibility_round_trips_and_old_preferences_keep_the_theme_default() {
let old = serde_json::from_value::<Preferences>(json!({"interface": {"uiFontSize": "small"}})).unwrap();
assert_eq!(old.interface.scrollbar_visibility, ScrollbarVisibility::Default);
assert_eq!(choices("interface.scrollbarVisibility"), Some(ScrollbarVisibility::NAMES));
let mut s = Session::new();
for mode in ScrollbarVisibility::NAMES {
s.execute("prefs.set", json!({"values": {"interface.scrollbarVisibility": mode}})).unwrap();
let saved = s.prefs().to_json();
let loaded: Preferences = serde_json::from_value(saved.clone()).unwrap();
assert_eq!(loaded.interface.scrollbar_visibility, s.prefs().interface.scrollbar_visibility);
assert_eq!(saved["interface"]["scrollbarVisibility"], json!(mode));
}
let before = s.prefs().to_json();
assert!(s.execute("prefs.set", json!({"values": {"interface.scrollbarVisibility": "sometimes"}})).is_err());
assert_eq!(s.prefs().to_json(), before);
s.execute("prefs.reset", json!({"path": "interface.scrollbarVisibility"})).unwrap();
assert_eq!(s.prefs().interface.scrollbar_visibility, ScrollbarVisibility::Default);
}
+1
View File
@@ -80,6 +80,7 @@ pub fn choices(path: &str) -> Option<&'static [&'static str]> {
"interface.canvasBorder" => CanvasBorder::NAMES,
"interface.uiScale" => UiScale::NAMES,
"interface.uiFontSize" => UiFontSize::NAMES,
"interface.scrollbarVisibility" => ScrollbarVisibility::NAMES,
"historyLog.destination" => LogDestination::NAMES,
"historyLog.detail" => LogDetail::NAMES,
"fileHandling.imagePreviews" | "fileHandling.maximizePsdCompatibility" => Ask::NAMES,
+7 -1
View File
@@ -1656,7 +1656,13 @@ fn finish_canvas_view(app: &mut PhotocraftApp, ui: &mut egui::Ui, view: &mut Vie
// Scrollbars (scrollbars.rs): drawn over the canvas edges, they take the pointer there.
let t0 = crate::gpu_canvas::now_ms();
let before = view.center;
let over_bars = app.ui.view.shows_scrollbars()
let mode=app.session.prefs().interface.scrollbar_visibility;
let visible=match mode {
photocraft_engine::prefs::ScrollbarVisibility::Hidden=>false,
photocraft_engine::prefs::ScrollbarVisibility::AutoHide=>ui.rect_contains_pointer(rect)||ui.input(|i|i.pointer.any_down()),
_=>true,
};
let over_bars = visible && app.ui.view.shows_scrollbars()
&& crate::scrollbars::show(ui, rect, view, flip, aspect, app.session.prefs().tools.overscroll, egui::Id::unique(("pc-canvas", idx)));
ctx.data_mut(|d| d.insert_temp(bars_id, over_bars));
if view.center != before {
+1
View File
@@ -4271,3 +4271,4 @@ cameraRaw Dehaze Odstranění oparu
Choose a custom shape file (.csh). Vyberte soubor vlastních tvarů (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Počet tvarů importovaných z {file}: {n}|Počet tvarů importovaných z {file}: {n}|Počet tvarů importovaných z {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Počet tvarů importovaných z {group}: {n}|Počet tvarů importovaných z {group}: {n}|Počet tvarů importovaných z {group}: {n}
Scrollbar Visibility Viditelnost posuvníků
Can't render this file because it contains an unexpected character in line 6 and column 47.
+2
View File
@@ -3546,3 +3546,5 @@ curves Smooth Glätten
Choose a custom shape file (.csh). Wählen Sie eine Datei mit eigenen Formen (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Anzahl der aus {file} importierten Formen: {n}|Anzahl der aus {file} importierten Formen: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Anzahl der aus {group} importierten Formen: {n}|Anzahl der aus {group} importierten Formen: {n}
Scrollbar Visibility Sichtbarkeit der Scrollleisten
Hidden Ausgeblendet
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -4226,3 +4226,4 @@ curves Smooth Εξομάλυνση
Choose a custom shape file (.csh). Επιλέξτε ένα αρχείο προσαρμοσμένων σχημάτων (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Αριθμός σχημάτων που εισήχθησαν από {file}: {n}|Αριθμός σχημάτων που εισήχθησαν από {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Αριθμός σχημάτων που εισήχθησαν από {group}: {n}|Αριθμός σχημάτων που εισήχθησαν από {group}: {n}
Scrollbar Visibility Ορατότητα γραμμών κύλισης
Can't render this file because it contains an unexpected character in line 47 and column 53.
+1
View File
@@ -4483,3 +4483,4 @@ navigator Zoom Zoom
Choose a custom shape file (.csh). Selecciona un archivo de formas personalizadas (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Cantidad de formas importadas de {file}: {n}|Cantidad de formas importadas de {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Cantidad de formas importadas de {group}: {n}|Cantidad de formas importadas de {group}: {n}
Scrollbar Visibility Visibilidad de las barras de desplazamiento
Can't render this file because it contains an unexpected character in line 4 and column 47.
+2
View File
@@ -3296,6 +3296,8 @@ curves Smooth Lisser
Remember to turn off the printer's own colour management in Print Settings… Pensez à désactiver la gestion des couleurs de l’imprimante dans les paramètres d’impression…
Sent to {printer} Envoyé à {printer}
set in Print Settings… défini dans les paramètres d’impression…
Scrollbar Visibility Visibilité des barres de défilement
Hidden Masqué
ICO is limited to 256 × 256 pixels Le format ICO est limité à 256 × 256 pixels
Show Favorite Fonts Afficher les polices favorites
No favorite fonts yet: click the star beside a font to add it. Aucune police favorite pour l’instant : cliquez sur l’étoile à côté d’une police pour l’ajouter.
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -4434,3 +4434,4 @@ cameraRaw Yellow Sárga
Choose a custom shape file (.csh). Válasszon egy egyéni alakzatfájlt (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} A(z) {file} forrásból importált alakzatok száma: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} A(z) {group} forrásból importált alakzatok száma: {n}
Scrollbar Visibility Görgetősávok láthatósága
Can't render this file because it contains an unexpected character in line 6 and column 47.
+2
View File
@@ -3546,3 +3546,5 @@ curves Smooth Haluskan
Choose a custom shape file (.csh). Pilih berkas bentuk khusus (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Jumlah bentuk yang diimpor dari {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Jumlah bentuk yang diimpor dari {group}: {n}
Scrollbar Visibility Visibilitas bilah gulir
Hidden Tersembunyi
Can't render this file because it contains an unexpected character in line 4 and column 47.
+1
View File
@@ -4637,3 +4637,4 @@ shape Appearance Aspetto
Choose a custom shape file (.csh). Scegli un file di forme personalizzate (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Numero di forme importate da {file}: {n}|Numero di forme importate da {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Numero di forme importate da {group}: {n}|Numero di forme importate da {group}: {n}
Scrollbar Visibility Visibilità delle barre di scorrimento
Can't render this file because it contains an unexpected character in line 79 and column 53.
+2
View File
@@ -3963,6 +3963,8 @@ curves Smooth スムーズ
Clear Brush Controls ブラシのコントロールを消去
Reset All Locked Settings ロックされた設定をすべて初期化
Copy Texture to Other Tools テクスチャを他のツールにコピー
Scrollbar Visibility スクロールバーの表示
Hidden 非表示
ICO is limited to 256 × 256 pixels ICO は 256 × 256 ピクセルまでです
Show Favorite Fonts お気に入りのフォントを表示
No favorite fonts yet: click the star beside a font to add it. お気に入りのフォントはまだありません。フォントの横の星をクリックして追加してください。
Can't render this file because it contains an unexpected character in line 6 and column 47.
+2
View File
@@ -3744,3 +3744,5 @@ curves Smooth 매끄럽게
Choose a custom shape file (.csh). 사용자 정의 모양 파일 (.csh)을 선택하세요.
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} {file}에서 가져온 모양 수: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} {group}에서 가져온 모양 수: {n}
Scrollbar Visibility 스크롤 막대 표시
Hidden 숨김
Can't render this file because it contains an unexpected character in line 63 and column 53.
+1
View File
@@ -4283,3 +4283,4 @@ curves Smooth Vloeiend maken
Choose a custom shape file (.csh). Kies een bestand met aangepaste vormen (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Aantal uit {file} geïmporteerde vormen: {n}|Aantal uit {file} geïmporteerde vormen: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Aantal uit {group} geïmporteerde vormen: {n}|Aantal uit {group} geïmporteerde vormen: {n}
Scrollbar Visibility Zichtbaarheid van schuifbalken
Can't render this file because it contains an unexpected character in line 8 and column 34.
+2
View File
@@ -4144,3 +4144,5 @@ curves Smooth Wygładź
Choose a custom shape file (.csh). Wybierz plik kształtów własnych (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Liczba kształtów zaimportowanych z {file}: {n}|Liczba kształtów zaimportowanych z {file}: {n}|Liczba kształtów zaimportowanych z {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Liczba kształtów zaimportowanych z {group}: {n}|Liczba kształtów zaimportowanych z {group}: {n}|Liczba kształtów zaimportowanych z {group}: {n}
Scrollbar Visibility Widoczność pasków przewijania
Hidden Ukryte
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -4451,3 +4451,4 @@ layerLabel No Color Sem cor
Choose a custom shape file (.csh). Escolha um arquivo de formas personalizadas (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Quantidade de formas importadas de {file}: {n}|Quantidade de formas importadas de {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Quantidade de formas importadas de {group}: {n}|Quantidade de formas importadas de {group}: {n}
Scrollbar Visibility Visibilidade das barras de rolagem
Can't render this file because it contains an unexpected character in line 6 and column 47.
+2
View File
@@ -3253,6 +3253,8 @@ curves Smooth Сгладить
Remember to turn off the printer's own colour management in Print Settings… Не забудьте отключить управление цветом самого принтера в параметрах печати…
Sent to {printer} Отправлено на {printer}
set in Print Settings… задаётся в параметрах печати…
Scrollbar Visibility Видимость полос прокрутки
Hidden Скрыто
ICO is limited to 256 × 256 pixels ICO ограничен размером 256 × 256 пикселей
Calibration Калибровка
Red Primary Красный основной
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -4313,6 +4313,7 @@ shape Appearance Izgled
set in Print Settings… podešava se u podešavanjima štampanja…
Paper Width Širina papira
Paper Height Visina papira
Scrollbar Visibility Vidljivost traka za pomeranje
ICO is limited to 256 × 256 pixels ICO je ograničen na 256 × 256 piksela
Mask Options… Opcije maske…
Layer Mask Display Options… Opcije prikaza maske sloja…
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -4250,3 +4250,4 @@ cameraData Lens Lens
Choose a custom shape file (.csh). Özel şekil dosyası (.csh) seçin.
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} {file} kaynağından içe aktarılan şekil sayısı: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} {group} kaynağından içe aktarılan şekil sayısı: {n}
Scrollbar Visibility Kaydırma çubuklarının görünürlüğü
Can't render this file because it contains an unexpected character in line 8 and column 34.
+2
View File
@@ -4236,3 +4236,5 @@ curves Smooth Згладити
Choose a custom shape file (.csh). Виберіть файл довільних фігур (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Кількість фігур, імпортованих із {file}: {n}|Кількість фігур, імпортованих із {file}: {n}|Кількість фігур, імпортованих із {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Кількість фігур, імпортованих із {group}: {n}|Кількість фігур, імпортованих із {group}: {n}|Кількість фігур, імпортованих із {group}: {n}
Scrollbar Visibility Видимість смуг прокручування
Hidden Приховано
Can't render this file because it contains an unexpected character in line 152 and column 53.
+5 -3
View File
@@ -158,6 +158,9 @@
# Art History Brush (#213).
# Egui 0.37 migration controls (Aspect Ratio, Category, Color Table, Gamma, Interpolation, Profile, Target, Units, Demosaic)
# Custom shape set import
Mask Options… Tùy chọn mặt nạ…
Layer Mask Display Options… Tùy chọn hiển thị mặt nạ lớp…
Channel Color Màu kênh
@@ -3796,13 +3799,10 @@ curves Smooth Làm mượt
Could not write {name}: {error} Không thể ghi {name}: {error}
Kept {name}: written by another application Đã giữ {name}: do ứng dụng khác ghi
Shadow Tint Sắc độ bóng tối
# Custom shape set import
Import Shapes… Nhập hình dạng…
Choose a custom shape file (.csh). Chọn tệp hình dạng tùy chỉnh (.csh).
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} Số hình dạng đã nhập từ {file}: {n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} Số hình dạng đã nhập từ {group}: {n}
Check for Updates… Kiểm tra bản cập nhật…
PhotoCraft Updates Bản cập nhật PhotoCraft
Checking for updates… Đang kiểm tra bản cập nhật…
@@ -4026,3 +4026,5 @@ curves Smooth Làm mượt
Select and Mask was closed: its document is no longer the active one Đã đóng Chọn và Mặt nạ: tài liệu của nó không còn là tài liệu đang hoạt động
Select and Mask was closed: another layer was selected Đã đóng Chọn và Mặt nạ: một lớp khác đã được chọn
Select Layer Under Cursor Chọn lớp dưới con trỏ
Scrollbar Visibility Hiển thị thanh cuộn
Hidden Ẩn
Can't render this file because it contains an unexpected character in line 6 and column 47.
+2
View File
@@ -3207,3 +3207,5 @@ curves Smooth 平滑
Choose a custom shape file (.csh). 请选择自定义形状文件 (.csh)。
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} 从 {file} 导入的形状数量:{n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} 从 {group} 导入的形状数量:{n}
Scrollbar Visibility 滚动条可见性
Hidden 隐藏
Can't render this file because it contains an unexpected character in line 63 and column 53.
+2
View File
@@ -3163,3 +3163,5 @@ curves Smooth 平滑
Choose a custom shape file (.csh). 請選擇自訂形狀檔案 (.csh)。
@plural Imported {n} shape from {file}|Imported {n} shapes from {file} 從 {file} 匯入的形狀數量:{n}
@plural Imported {n} shape from {group}|Imported {n} shapes from {group} 從 {group} 匯入的形狀數量:{n}
Scrollbar Visibility 捲軸可見性
Hidden 隱藏
Can't render this file because it contains an unexpected character in line 6 and column 47.
@@ -34,6 +34,7 @@ pub(super) fn humanize(key: &str) -> String {
"darkTheme" => return "Dark Theme".into(),
"lightTheme" => return "Light Theme".into(),
"automaticallyCheckUpdates" => return "Automatically Check for Updates".into(),
"scrollbarVisibility" => return "Scrollbar Visibility".into(),
_ => {}
}
// These controls appear only for WebP, so reuse the existing translated labels.
@@ -96,6 +97,7 @@ pub(super) fn humanize(key: &str) -> String {
pub(super) fn choice_label(v: &str) -> String {
match v {
"autoHide" => "Auto Hide".into(),
"exr" => "EXR".into(),
"cm" => "Centimeters".into(),
"mm" => "Millimeters".into(),
@@ -11,6 +11,7 @@ pub fn tick(app: &mut PhotocraftApp, ctx: &egui::Context) {
sync_rulers(app);
sync_display_scale(app, ctx);
sync_appearance(app, ctx);
crate::theme::sync_scrollbars(ctx, app.session.prefs().interface.scrollbar_visibility);
crate::theme::set_ui_font_size(ctx, app.session.prefs().interface.ui_font_size);
presets_store(app);
sync_tooltips(app, ctx);
+42
View File
@@ -1099,6 +1099,48 @@ pub fn apply(ctx: &egui::Context, kind: ThemeKind) {
let style = ctx.global_style();
ctx.set_style_of(egui::Theme::Light, Arc::clone(&style));
ctx.set_style_of(egui::Theme::Dark, style);
ctx.data_mut(|d| d.remove::<photocraft_engine::prefs::ScrollbarVisibility>(egui::Id::unique("pc-scrollbar-visibility")));
}
/// Apply the saved override once per change, including after a theme switch.
pub(crate) fn sync_scrollbars(ctx: &egui::Context, mode: photocraft_engine::prefs::ScrollbarVisibility) {
use photocraft_engine::prefs::ScrollbarVisibility;
let id = egui::Id::unique("pc-scrollbar-visibility");
if ctx.data(|d| d.get_temp::<ScrollbarVisibility>(id)) == Some(mode) {
return;
}
let t = Tokens::get(ctx);
let mut scroll = match mode {
ScrollbarVisibility::Always => egui::style::ScrollStyle::solid(),
ScrollbarVisibility::AutoHide | ScrollbarVisibility::Hidden => egui::style::ScrollStyle::floating(),
ScrollbarVisibility::Default if t.bevel => egui::style::ScrollStyle::solid(),
ScrollbarVisibility::Default => egui::style::ScrollStyle::thin(),
};
if scroll.floating {
scroll.interact_handle_opacity = 1.0;
scroll.interact_background_opacity = 0.4;
if mode == ScrollbarVisibility::Default {
scroll.floating_width = 4.0;
}
}
if mode == ScrollbarVisibility::Hidden {
scroll.bar_width = 0.0;
scroll.floating_width = 0.0;
scroll.floating_allocated_width = 0.0;
scroll.bar_inner_margin = 0.0;
scroll.bar_outer_margin = 0.0;
scroll.dormant_handle_opacity = 0.0;
scroll.active_handle_opacity = 0.0;
scroll.interact_handle_opacity = 0.0;
scroll.dormant_background_opacity = 0.0;
scroll.active_background_opacity = 0.0;
scroll.interact_background_opacity = 0.0;
}
ctx.global_style_mut(|s| s.spacing.scroll = scroll);
let style = ctx.global_style();
ctx.set_style_of(egui::Theme::Light, Arc::clone(&style));
ctx.set_style_of(egui::Theme::Dark, style);
ctx.data_mut(|d| d.insert_temp(id, mode));
}
/// Seconds the pointer rests on a control before its tooltip shows.
+52
View File
@@ -1,5 +1,57 @@
use super::*;
#[test]
fn scrollbar_visibility_applies_in_every_theme_and_survives_theme_changes() {
use photocraft_engine::prefs::ScrollbarVisibility as Mode;
let ctx = egui::Context::default();
for kind in ThemeKind::ALL {
apply(&ctx, kind);
let original = ctx.global_style().spacing.scroll;
sync_scrollbars(&ctx, Mode::Default);
assert_eq!(ctx.global_style().spacing.scroll, original);
sync_scrollbars(&ctx, Mode::Always);
assert!(!ctx.global_style().spacing.scroll.floating);
assert!(ctx.global_style().spacing.scroll.bar_width > 0.0);
sync_scrollbars(&ctx, Mode::AutoHide);
assert!(ctx.global_style().spacing.scroll.floating);
assert_eq!(ctx.global_style().spacing.scroll.dormant_handle_opacity, 0.0);
sync_scrollbars(&ctx, Mode::Hidden);
assert_eq!(ctx.global_style().spacing.scroll.bar_width, 0.0);
apply(&ctx, kind);
sync_scrollbars(&ctx, Mode::Hidden);
assert_eq!(ctx.global_style().spacing.scroll.bar_width, 0.0, "theme changes retain the saved override");
sync_scrollbars(&ctx, Mode::Default);
assert_eq!(ctx.global_style().spacing.scroll, original);
}
}
#[test]
fn hidden_scrollbars_keep_wheel_scrolling_available() {
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(300.0, 120.0)).build_ui_state(
|ui, offset: &mut f32| {
let area = egui::ScrollArea::vertical().max_height(100.0).show(ui, |ui| {
for i in 0..30 {
ui.label(format!("Row {i}"));
}
});
*offset = area.state.offset.y;
},
0.0,
);
sync_scrollbars(&h.ctx, photocraft_engine::prefs::ScrollbarVisibility::Hidden);
h.run();
h.hover_at(egui::pos2(30.0, 40.0));
h.event(egui::Event::MouseWheel {
unit: egui::MouseWheelUnit::Line,
delta: egui::vec2(0.0, -3.0),
phase: egui::TouchPhase::Move,
modifiers: egui::Modifiers::NONE,
});
h.run();
assert!(*h.state() > 0.0);
assert_eq!(h.ctx.global_style().spacing.scroll.allocated_width(), 0.0);
}
fn text_sizes(ctx: &egui::Context) -> Vec<egui::Vec2> {
let mut sizes = Vec::new();
// The plugin queues changed fonts at the end of a pass; egui applies them next pass.
+3
View File
@@ -283,6 +283,8 @@ what an agent can't finish alone.
- **Progress (2026-10-14, #5556):** Character and Paragraph controls stay available without
a type target, editing persisted Type tool defaults inherited by new text. Formatting existing
selected text keeps its current command and undo scope. Other panel gaps remain open.
- **Progress (2026-10-13):** scrollbar visibility can follow the theme, stay expanded, auto-hide
or be hidden; panel and canvas scrolling remain available (#3262).
- **Progress (2026-10-12):** toolbar tool shortcuts can be reassigned, removed and reset (#4086),
with saved bindings, matching toolbar hints and regression coverage (`ui-egui/src/tool_shortcuts.rs`).
- **Progress (2026-10-15):** the Color panel has Photoshop's panel-menu modes (Hue Cube, Brightness
@@ -469,6 +471,7 @@ what an agent can't finish alone.
| 2026-10-13 | minor | G14: lossy DNG (#5112), `.xmp` sidecars, Camera Raw Defaults wired, Calibration panel and Auto; CR3 sensor decode ruled out under the clean-room rule |
| 2026-10-13 | minor | G4: Hue Jitter amount-track appearance (#3825, partial); no readiness percentage or estimate changed |
| 2026-10-13 | minor | G2: Content-Aware Scale (P28) measured: carve 2013 → 556 ms, row 3.28 → 1.64 s on a 4-core VM, output unchanged; baseline, budgets and estimate unchanged |
| 2026-10-13 | minor | Scrollbar visibility preference for panels and the canvas (#3262), with live application, theme retention and wheel-scrolling coverage |
| 2026-10-13 | minor | G4: minimum inputs in Shape Dynamics and Transfer follow their Control (#3825, partial); no readiness percentage or estimate changed |
| 2026-10-12 | minor | G5: Free Transform options bar H/V skew fields done |
| 2026-10-12 | minor | G11: `.atn` import maps 112 events (Select and Mask, Spatter, Ripple, Crystallize, Pattern Fill, mask targeting, Step Backward, points, Bitmap) |
+6
View File
@@ -166,6 +166,12 @@ On Windows and Linux, System Title Bar displays “Applies at next launch.” be
including before editing and after Apply. Saving this preference does not restart the app or
change the current window's decorations; the next launch reads the saved choice.
Interface → Scrollbar Visibility applies immediately. Default follows the selected theme.
Always keeps scrollbars expanded when the content needs them; Auto Hide uses overlay bars
that appear while hovering or scrolling. Hidden removes the bars while keeping wheel,
trackpad and keyboard scrolling available. The setting also applies to the canvas in
Standard Screen Mode and survives restarts and theme changes (#3262).
## High DPI and 4K displays
Edit → Preferences → Interface → UI Scale applies immediately. Auto follows the operating
+2
View File
@@ -170,6 +170,7 @@ Triangle and Curvature Pen (minus legacy Rounded Rectangle and Targeted Adjustme
| Ruler corner and gaps drawn as Photoshop | partial | #2600, #2601, #2551 |
| Guides stored as f64 | missing | `Vec<f32>` (UI-217-20) |
| Geometry precision | partial | `geom::Point` f64, paths f64; paint internals mostly f32 |
| Scrollbar visibility preference | done | Default, Always, Auto Hide and Hidden apply to panels and the canvas; live settings, theme changes and scrolling are covered (#3262) |
| Numeric fields: arithmetic, scrubby labels | partial | units in expressions and double-click reset missing (UI-217-13) |
| Wheel steps a value field, ⇧ ×10: clicked into, wherever the pointer is; not clicked, a gesture that starts over it | partial | `field_wheel.rs` (#5473, #4061). Photoshop: a field takes the wheel once clicked into (shortcut guides, user reports); whether the pointer must stay over it is unconfirmed. Stepping on hover alone is Photopea's, kept deliberately |
| Type options bar: drag the "T" icon to change the font size | done | `type_tool.rs` `options_bar`: the icon scrubs the size field like the Character panel's icons (Shift x10, Alt fine), at layer or selection scope, one history step per drag, within 1–1296 pt (#6437) |
@@ -286,6 +287,7 @@ Paragraph; the rest open as in-app floating windows.
| 2026-10-14 | minor | ⌥ while dragging a guide turns it horizontal ↔ vertical, as in Photoshop; a guide dropped on either ruler is deleted (#5034) |
| 2026-10-13 | minor | Stale "missing tool" rows corrected against main: Color Replacement (`paint.colorReplacement`), Red Eye (`paint.redEye`) and Add/Delete Anchor Point (the P flyout cycle) are live toolbar tools, so only Art History Brush is missing; no percentage or estimate changed |
| 2026-10-13 | minor | Smart object perspective (non-affine) corrected to done: #426 landed four-corner placements with PSD round trip; scorecard FILE-215-6 flipped |
| 2026-10-13 | minor | Scrollbar visibility preference for panels and the canvas (#3262), with live application, theme retention and wheel-scrolling coverage |
| 2026-10-10 | major | First version, from a source audit against Photoshop 2026 27.11.0's shortcuts file and the open issues |
| 2026-10-12 | minor | New Group button groups two or more selected layers (CC 2014+); New Group dialog (Layer › New, Layers panel menu, row menu, ⌥-click); ⌘-click New Group adds the group below; groups made from layers start collapsed (#2561) |
| 2026-10-12 | minor | New layers go into an open active group (or the artboard their content is on) and join the clip group they land in (#2203); ⌘-click New Layer adds below |