cushy/examples/nested-scroll.rs
Jonathan Johnson 2fe28729df
Directly depending on figures
While this was a workaround for a docs.rs issue (Px/Lp are not
linked), I decided having the shorter import path would look better in
the examples.

It probably wasn't necessary to update all of the references in the
internal code, but I decided it was worth the consistency.
2023-12-28 09:35:24 -08:00

23 lines
692 B
Rust

use cushy::styles::components::FontFamily;
use cushy::styles::FontFamilyList;
use cushy::widget::MakeWidget;
use cushy::Run;
use figures::units::Lp;
use kludgine::cosmic_text::FamilyOwned;
fn main() -> cushy::Result {
include_str!("./nested-scroll.rs")
.vertical_scroll()
.with(&FontFamily, FontFamilyList::from(FamilyOwned::Monospace))
.height(Lp::inches(3))
.and(
include_str!("./canvas.rs")
.vertical_scroll()
.with(&FontFamily, FontFamilyList::from(FamilyOwned::Monospace))
.height(Lp::inches(3)),
)
.into_rows()
.vertical_scroll()
.expand()
.run()
}