iris/android-app: Diagnostics control, top-bar status-bar padding, cargo fmt
Adds a third "Diagnostics" button to the bench screen's top row, filling the existing benchmark-report TextEdit (so the existing "Copy report" button and clipboard path work on it unchanged) with adapter identity, font resolution, atlas view count, wgpu errors seen so far and the frame report -- RUST.md's P0 box, "a named Diagnostics control ... copy this and send it to Iris." Logs the same font-resolution summary once at startup too. Wires BenchClient::on_insets_changed (the new AndroidAppState hook) to rebuild the top button row with Padding::top(insets.top), through a WidgetPtr slot (top_bar) so it can be swapped once the status-bar inset is known -- fixes RUST.md's P0 box, "the status-bar inset is not applied," where the two top buttons sat directly under the status bar because nothing in this file read insets().top at all. cargo fmt --all across the touched files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
184a6c5b33
commit
27511302f2
6 files changed
+119
-25
No files matched your search
@@ -26,10 +26,8 @@ use swash::{
|
||||
const NOTO_SANS_REGULAR: &[u8] = include_bytes!("../../assets/fonts/NotoSans-Regular.ttf");
|
||||
const NOTO_SANS_BOLD: &[u8] = include_bytes!("../../assets/fonts/NotoSans-Bold.ttf");
|
||||
const NOTO_SANS_ITALIC: &[u8] = include_bytes!("../../assets/fonts/NotoSans-Italic.ttf");
|
||||
const NOTO_SANS_BOLD_ITALIC: &[u8] =
|
||||
include_bytes!("../../assets/fonts/NotoSans-BoldItalic.ttf");
|
||||
const NOTO_SANS_MONO_REGULAR: &[u8] =
|
||||
include_bytes!("../../assets/fonts/NotoSansMono-Regular.ttf");
|
||||
const NOTO_SANS_BOLD_ITALIC: &[u8] = include_bytes!("../../assets/fonts/NotoSans-BoldItalic.ttf");
|
||||
const NOTO_SANS_MONO_REGULAR: &[u8] = include_bytes!("../../assets/fonts/NotoSansMono-Regular.ttf");
|
||||
const NOTO_SANS_MONO_BOLD: &[u8] = include_bytes!("../../assets/fonts/NotoSansMono-Bold.ttf");
|
||||
|
||||
/// What starting up found about text rendering, for the on-screen
|
||||
@@ -203,14 +201,26 @@ impl TextData {
|
||||
family_id.and_then(|id| self.font_cx.collection.family_name(id).map(str::to_string))
|
||||
};
|
||||
|
||||
let regular_resolved =
|
||||
resolve_family(GenericFamily::SansSerif, FontWeight::NORMAL, FontStyle::Normal);
|
||||
let bold_resolved =
|
||||
resolve_family(GenericFamily::SansSerif, FontWeight::BOLD, FontStyle::Normal);
|
||||
let italic_resolved =
|
||||
resolve_family(GenericFamily::SansSerif, FontWeight::NORMAL, FontStyle::Italic);
|
||||
let mono_resolved =
|
||||
resolve_family(GenericFamily::Monospace, FontWeight::NORMAL, FontStyle::Normal);
|
||||
let regular_resolved = resolve_family(
|
||||
GenericFamily::SansSerif,
|
||||
FontWeight::NORMAL,
|
||||
FontStyle::Normal,
|
||||
);
|
||||
let bold_resolved = resolve_family(
|
||||
GenericFamily::SansSerif,
|
||||
FontWeight::BOLD,
|
||||
FontStyle::Normal,
|
||||
);
|
||||
let italic_resolved = resolve_family(
|
||||
GenericFamily::SansSerif,
|
||||
FontWeight::NORMAL,
|
||||
FontStyle::Italic,
|
||||
);
|
||||
let mono_resolved = resolve_family(
|
||||
GenericFamily::Monospace,
|
||||
FontWeight::NORMAL,
|
||||
FontStyle::Normal,
|
||||
);
|
||||
|
||||
FontDiagnostics {
|
||||
families_found,
|
||||
|
||||
Reference in new issue
Block a user