Merge pull request #1810 from ramox81/codex/insert-import-panel

Insert ribbon: Import panel

# Conflicts:
#	locales/ar-SA/opencadstudio.ftl
#	locales/bg-BG/opencadstudio.ftl
#	locales/cs-CZ/opencadstudio.ftl
#	locales/de-DE/opencadstudio.ftl
#	locales/el-GR/opencadstudio.ftl
#	locales/en-US/opencadstudio.ftl
#	locales/es-ES/opencadstudio.ftl
#	locales/fi-FI/opencadstudio.ftl
#	locales/fr-FR/opencadstudio.ftl
#	locales/hi-IN/opencadstudio.ftl
#	locales/hu-HU/opencadstudio.ftl
#	locales/it-IT/opencadstudio.ftl
#	locales/ja-JP/opencadstudio.ftl
#	locales/ko-KR/opencadstudio.ftl
#	locales/lo-LA/opencadstudio.ftl
#	locales/nl-NL/opencadstudio.ftl
#	locales/pl-PL/opencadstudio.ftl
#	locales/pt-BR/opencadstudio.ftl
#	locales/ru-RU/opencadstudio.ftl
#	locales/tr-TR/opencadstudio.ftl
#	locales/zh-CN/opencadstudio.ftl
#	locales/zh-TW/opencadstudio.ftl
#	src/modules/insert/mod.rs
#	src/ui/ribbon/draw_panel.rs
This commit is contained in:
Hakan Seven committed 2026-10-15 16:47:38 +03:00
commit 443d3ec13d
33 files changed
+285 -42

No files matched your search

+6
View File
@@ -501,6 +501,8 @@ fn tool_description(id: &str) -> Option<&'static str> {
/// A tool's tooltip: its name, its description when one is known, and the
/// command it runs.
fn tool_tip_text(label: &str, id: &str) -> String {
// A macro (`PDFIMPORT;FILE`) shows the command it starts.
let id = id.split(';').next().unwrap_or(id);
match tool_description(id) {
Some(description) => format!("{label}\n{}\n{} {id}", t!(description), t!("Command:")),
None => format!("{label}\n{} {id}", t!("Command:")),
@@ -827,6 +829,10 @@ pub(super) fn render_large_dropdown<'a>(
})
.or_else(|| items.first().map(|(_, lbl, _)| *lbl))
.unwrap_or(id);
// An empty label: the face keeps its own icon and names the chosen item.
let names_item = explicit_label == Some("");
let cur_icon = if names_item { icon } else { cur_icon };
let explicit_label = explicit_label.filter(|label| !label.is_empty());
let label = t!(explicit_label.unwrap_or(cur_label)).into_owned();
let tip_text = tool_tip_text(&t!(cur_label), last);
let arr_tip = format!("{} {}", label, t!("options"));