forked from 1b-agent/opencadstudio-upstream
feat(options): command line text colour and a fonts folder
Display gets a command line text colour (blank keeps the theme's); it covers history, prompts and the input, while errors stay red. Files lists the fonts folder that text resolution searches, so .shx files can be added by hand; opening it creates it first. Discussions #1493, #1372 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1c37c90c75
commit
7a8ec02003
29 files changed
+144
-15
No files matched your search
+19
-1
@@ -8060,6 +8060,20 @@ impl OpenCADStudio {
|
||||
None => Message::Noop,
|
||||
},
|
||||
),
|
||||
Message::CommandTextColorChanged(value) => {
|
||||
self.command_text_color_input = value.clone();
|
||||
let color = if value.trim().is_empty() {
|
||||
None
|
||||
} else if let Some(rgb) = crate::app::config::parse_hex(&value) {
|
||||
Some(rgb)
|
||||
} else {
|
||||
return Task::none();
|
||||
};
|
||||
self.command_text_color = color;
|
||||
crate::ui::command_line::set_text_color(color);
|
||||
self.persist_settings_if_changed();
|
||||
Task::none()
|
||||
}
|
||||
Message::SnapMarkerColorChanged(value) => {
|
||||
self.snap_marker_color_input = value.clone();
|
||||
if value.trim().is_empty() {
|
||||
@@ -8532,7 +8546,11 @@ impl OpenCADStudio {
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::OpenFolder(path) => crate::sys::open_url(&path, None),
|
||||
Message::OpenFolder(path) => {
|
||||
// The fonts folder exists only once something is put in it.
|
||||
let _ = std::fs::create_dir_all(&path);
|
||||
crate::sys::open_url(&path, None)
|
||||
}
|
||||
|
||||
Message::PickDragRectToggled(rectangle) => {
|
||||
self.pick_drag_rect = rectangle;
|
||||
|
||||
Reference in new issue
Block a user