feat(command-line): adjustable command line opacity

COMMANDLINEOPACITY (20-100 percent, default 100) and a slider under
Options > Display make the floating command line's panels see-through,
so the drawing stays visible behind it. The input field stays opaque
for legibility. The value is an application setting that persists.

Refs #1494

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-13 15:46:28 +03:00
1 parent 5a6f69f3f8
commit 5dd05bca18
32 files changed
+98 -5

No files matched your search

+1
View File
@@ -754,6 +754,7 @@ inventory::submit!(crate::command::CommandRegistration {
"SKTOLERANCE",
"CLIPROMPTLINES",
"COMMANDLINEFADETIME",
"COMMANDLINEOPACITY",
"COLORTHEME",
"SELECTIONAREA",
"SELECTIONAREAOPACITY",
+18
View File
@@ -1149,6 +1149,7 @@ impl OpenCADStudio {
| "CURSORSIZE"
| "PICKBOX"
| "HPASSOC"
| "COMMANDLINEOPACITY"
| "CURSORTYPE"
| "SNAPANG"
| "TEXTFILL"
@@ -2537,6 +2538,22 @@ impl OpenCADStudio {
false,
)),
},
"COMMANDLINEOPACITY" => match &value {
Some(v) => match v.parse::<u8>() {
Ok(n) if (20..=100).contains(&n) => {
self.command_line.set_opacity_percent(n);
Ok((format!("COMMANDLINEOPACITY = {n}"), true))
}
_ => Err("SETVAR: integer from 20 to 100 required.".into()),
},
None => Ok((
format!(
"COMMANDLINEOPACITY = {}",
self.command_line.opacity_percent()
),
false,
)),
},
"COMMANDLINEFADETIME" => match &value {
Some(v) => match v.parse::<i32>() {
Ok(n) if (0..=60000).contains(&n) => {
@@ -3147,6 +3164,7 @@ impl OpenCADStudio {
| "CURSORSIZE"
| "PICKBOX"
| "HPASSOC"
| "COMMANDLINEOPACITY"
| "CURSORTYPE"
| "SNAPANG"
| "CLIPROMPTLINES"
+2
View File
@@ -2607,6 +2607,8 @@ pub enum Message {
ClipromptLinesChanged(i32),
/// Change how long command-line history lines stay visible (COMMANDLINEFADETIME).
CommandLineFadeChanged(i32),
/// Change the command line's panel opacity (COMMANDLINEOPACITY).
CommandLineOpacityChanged(u8),
/// Toggle reversing the mouse-wheel zoom direction (ZOOMWHEEL).
ZoomWheelReversedChanged(bool),
TouchpadPanChanged(bool),
+3
View File
@@ -587,6 +587,8 @@ pub struct UserSettings {
deserialize_with = "deserialize_commandline_fade_ms"
)]
pub commandline_fade_ms: i32,
/// COMMANDLINEOPACITY: command-line panel opacity in percent (20–100).
pub command_line_opacity: u8,
/// SNAPUNIT X/Y spacing used by grid snap. 10 matches the Drafting
/// Settings dialog defaults; older configs without these keys fall
/// back via `default_snap_spacing`.
@@ -896,6 +898,7 @@ impl Default for UserSettings {
language: crate::i18n::Language::default(),
cliprompt_lines: 3,
commandline_fade_ms: 3000,
command_line_opacity: 100,
snap_spacing_x: 10.0,
snap_spacing_y: 10.0,
grid_spacing_x: 10.0,
+2
View File
@@ -847,6 +847,7 @@ impl OpenCADStudio {
quick_properties: self.quick_properties,
language: self.language,
cliprompt_lines: crate::app::settings::clamp_clipromptlines(self.cliprompt_lines),
command_line_opacity: self.command_line.opacity_percent(),
commandline_fade_ms: crate::app::settings::clamp_commandline_fade_ms(
self.commandline_fade_ms,
),
@@ -999,6 +1000,7 @@ impl OpenCADStudio {
self.cliprompt_lines = crate::app::settings::clamp_clipromptlines(s.cliprompt_lines);
self.command_line
.set_cliprompt_lines(self.cliprompt_lines.clamp(0, 50) as u8);
self.command_line.set_opacity_percent(s.command_line_opacity);
self.commandline_fade_ms =
crate::app::settings::clamp_commandline_fade_ms(s.commandline_fade_ms);
self.command_line
+6
View File
@@ -9057,6 +9057,12 @@ impl OpenCADStudio {
Task::none()
}
Message::CommandLineOpacityChanged(percent) => {
self.command_line.set_opacity_percent(percent);
self.persist_settings_if_changed();
Task::none()
}
Message::CommandLineFadeChanged(ms) => {
let ms = crate::app::settings::clamp_commandline_fade_ms(ms);
self.commandline_fade_ms = ms;
+1
View File
@@ -299,6 +299,7 @@ impl OpenCADStudio {
textfill: crate::scene::text::sdf_atlas::textfill(),
cliprompt_lines: self.cliprompt_lines,
commandline_fade_ms: self.commandline_fade_ms,
command_line_opacity: self.command_line.opacity_percent(),
zoom_wheel_reversed: self.zoom_wheel_reversed,
touchpad_pan: self.touchpad_pan,
ui_scale_percent: self.ui_scale_percent,