Prune commentary and stale Rust port notes
This commit is contained in:
1 parent
3ae034a47b
commit
1e6d3b1edd
84 files changed
+334
-5648
No files matched your search
+1
-5
@@ -3,11 +3,7 @@ name = "tabs-ui"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
# The tabs example's widget tree, factored out of iris/examples/tabs/main.rs
|
||||
# so it can be built once and driven by either backend: the winit example
|
||||
# binary, and iris/android-app's cdylib. Its own crate rather than a pub
|
||||
# module of `iris` because it is demo content, not library surface -- see
|
||||
# RUST.md's I2.
|
||||
# Shared demo content for the desktop and Android example entry points.
|
||||
|
||||
[dependencies]
|
||||
iris = { path = ".." }
|
||||
@@ -1,13 +1,3 @@
|
||||
//! The tabs example's widget tree -- the five demo panes plus the message
|
||||
//! composer that exercises `TextEdit`. Factored out of
|
||||
//! `iris/examples/tabs/main.rs` (I2, RUST.md) so the same UI runs under
|
||||
//! both backends: the winit example binary calls `build` from
|
||||
//! `DefaultAppState::new`, and `iris-android-app`'s cdylib calls it from
|
||||
//! `AndroidAppState::new`. Nothing here mentions either backend by name --
|
||||
//! it only needs `Rsc: HasEvents` (for `.on(...)`) and `Rsc::State:
|
||||
//! FocusHost` (for `.attr::<Selectable>(())`), both of which every backend
|
||||
//! implements.
|
||||
|
||||
use iris::prelude::*;
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
@@ -181,12 +171,6 @@ where
|
||||
.on(CursorSense::HoverEnd, move |ctx, rsc| {
|
||||
ctx.widget(rsc).color = color;
|
||||
})
|
||||
// I4 (RUST.md): the tabs screen's only named controls, and the
|
||||
// ones the emulator step at the bottom of that box taps by
|
||||
// name -- `ui-trace record --do "tap 'pad'"` and so on. `.label`
|
||||
// slots into this chain like any other widget combinator
|
||||
// (`RefFnTag` in `core/src/widget/tag.rs`); it does not have to
|
||||
// be the last thing before `.add`.
|
||||
.label(label);
|
||||
(rect, wtext(label).size(30).text_align(Align::CENTER)).stack()
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user