feat: add Report/About/Changelog buttons to Support ribbon group

- REPORT opens GitHub new-issue page
- ABOUT opens a dialog window with version, OS and arch info + Copy Info button
- CHANGELOG opens GitHub releases page
- Fix Windows build: add windows-sys as target-specific dependency for PRINT command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-04-22 22:22:33 +03:00
commit 070ad1f9c5
15 changed files with 222 additions and 0 deletions

View file

@ -704,6 +704,7 @@ impl H7CAD {
if self.plotstyle_window == Some(id) { self.plotstyle_window = None; }
if self.dimstyle_window == Some(id) { self.dimstyle_window = None; }
if self.shortcuts_window == Some(id) { self.shortcuts_window = None; }
if self.about_window == Some(id) { self.about_window = None; }
Task::none()
}
@ -2502,6 +2503,30 @@ impl H7CAD {
}
}
// ── About window ──────────────────────────────────────────────
Message::AboutOpen => {
if let Some(id) = self.about_window {
return window::gain_focus(id);
}
let (id, task) = window::open(window::Settings {
size: iced::Size::new(340.0, 240.0),
resizable: false,
..Default::default()
});
self.about_window = Some(id);
task.map(|_| Message::Noop)
}
Message::AboutCopyInfo => {
let info = format!(
"H7CAD v{}\nOS: {}\nArch: {}",
env!("CARGO_PKG_VERSION"),
std::env::consts::OS,
std::env::consts::ARCH,
);
iced::clipboard::write(info)
}
Message::ViewportContextMenuClose => {
let i = self.active_tab;
self.tabs[i].scene.selection.borrow_mut().context_menu = None;