On hybrid-graphics laptops (an integrated GPU driving the display plus a discrete one), egui-wgpu's default power preference is HighPerformance, so VectorCraft rendered on the discrete GPU and its frames were copied to the display through the integrated one. On an Asus ZenBook with Intel Iris + Arc the window flickered whenever the mouse moved over it (#306, #305). The canvas is rasterized on the CPU (vello_cpu) and the GPU only composites the canvas texture and draws the UI, so the integrated GPU is plenty. The desktop app now asks wgpu for the power-saving adapter by default. Single-GPU machines are unaffected. - Preferences > Performance > Graphics Processor (`gpuPreference`: powerSaving, the default, or highPerformance), with a note that it applies after a restart. The app reads it from the saved preferences before the window opens. WGPU_POWER_PREF still overrides it. - Help > About and `ui.inspect` (`graphicsAdapter`) name the adapter in use, and it is logged at startup, for future GPU bug reports. - Docs (README, docs/development.md) and ROADMAP updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.9 KiB
Rust
48 lines
1.9 KiB
Rust
//! Help → About VectorCraft.
|
||
|
||
use crate::VectorcraftApp;
|
||
use crate::theme;
|
||
|
||
/// The About window, while `UiState::about` is set.
|
||
pub(super) fn show(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||
if !app.ui.about {
|
||
return;
|
||
}
|
||
let mut open = true;
|
||
egui::Window::new(tl!("About VectorCraft"))
|
||
.collapsible(false)
|
||
.resizable(false)
|
||
.open(&mut open)
|
||
.anchor(egui::Align2::CENTER_CENTER, [0.0, 0.0])
|
||
.frame(egui::Frame::window(&ctx.global_style()).inner_margin(egui::Margin::same(18)))
|
||
.show(ctx, |ui| {
|
||
ui.set_width(380.0);
|
||
ui.horizontal(|ui| {
|
||
let (r, _) = ui.allocate_exact_size(egui::vec2(44.0, 44.0), egui::Sense::hover());
|
||
crate::brand::paint_mark(ui, r);
|
||
ui.vertical(|ui| {
|
||
ui.label(egui::RichText::new("VectorCraft").font(theme::semibold(22.0)));
|
||
ui.label(crate::i18n::fmt(
|
||
tl!("Version {version} — open-source vector illustration in pure Rust."),
|
||
&[("version", env!("CARGO_PKG_VERSION"))],
|
||
));
|
||
});
|
||
});
|
||
ui.add_space(12.0);
|
||
crate::community::links(app, ui);
|
||
ui.add_space(12.0);
|
||
ui.label(
|
||
egui::RichText::new(tl!(
|
||
"Part of ArtCraft. MIT OR Apache-2.0. Fonts: Source Sans 3, Inter, JetBrains Mono (OFL). Icons: Lucide (ISC) + VectorCraft."
|
||
))
|
||
.size(11.0),
|
||
);
|
||
// The GPU the window renders with, for bug reports (Preferences › Performance picks it).
|
||
if let Some(adapter) = &app.graphics_adapter {
|
||
ui.add_space(6.0);
|
||
ui.label(egui::RichText::new(crate::i18n::fmt(tl!("Graphics: {adapter}"), &[("adapter", adapter.as_str())])).size(11.0));
|
||
}
|
||
});
|
||
app.ui.about = open;
|
||
}
|