Select Color: one fixed colour book folder instead of a folder list setting

The color_book_dirs setting is gone. Colour books live in color_books in
the config folder (book::folder()), like the other fixed locations;
Options > Files shows it through Folders::color_books. read_all() and
load_from_dialog() use that folder directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rGmDUNr1hUf4zo1X3dak8
This commit is contained in:
Claude committed 2026-10-14 20:15:53 +00:00
1 parent a9d8d4b531
commit 6e05c7e2e5
7 files changed
+47 -72

No files matched your search

+7 -8
View File
@@ -108,6 +108,8 @@ pub struct Folders {
/// Where `.shx` / `.ttf` fonts dropped in by the user (or downloaded for
/// a drawing) are found.
pub fonts: Option<String>,
/// Where `.acb` colour books are kept and loaded ones copied to.
pub color_books: Option<String>,
}
/// Values read from the current drawing's header rather than from preferences.
@@ -212,7 +214,6 @@ pub fn view_window<'a>(
drawing_prefs: DrawingPrefs,
folders: Folders,
qnew_template: &'a str,
color_book_dirs: &'a [String],
double_click_block_refedit: bool,
double_click_block_attedit: bool,
cursor_type: CursorType,
@@ -1791,13 +1792,11 @@ pub fn view_window<'a>(
folder_row(crate::t!("Autosave files"), folders.autosave.clone()),
Space::new().height(12),
folder_row(crate::t!("Fonts"), folders.fonts.clone()),
// Where `.acb` colour books are found (none on the web).
color_book_dirs.iter().fold(column![], |rows, dir| rows
.push(Space::new().height(12))
.push(folder_row(
crate::t!("Color book locations"),
Some(dir.clone())
))),
Space::new().height(12),
folder_row(
crate::t!("Color book locations"),
folders.color_books.clone()
),
Space::new().height(16),
text(crate::t!("Default template for new drawings")).size(12),
Space::new().height(4),