feat: add native material backgrounds
This commit is contained in:
@@ -146,12 +146,13 @@ fn the_header_toggle_hides_its_sidebar() {
|
||||
// icon-only small button: derive its center from the theme metrics.
|
||||
let metrics = cx.update(|cx| cx.theme().sizes.resolve(Size::default()));
|
||||
let small = cx.update(|cx| cx.theme().sizes.resolve(Size::Small));
|
||||
let strip_height = cx.update(|cx| cx.theme().titlebar_height);
|
||||
let region = bounds(&mut visual, "sidebar-test-left").expect("left sidebar missing");
|
||||
// The Sidebar fills the content area below the strip; the toggle sits at
|
||||
// the strip's trailing end, one strip height above the sidebar's top.
|
||||
let toggle = point(
|
||||
region.right() - metrics.dense_padding_x - small.control_height / 2.0,
|
||||
region.top() - metrics.strip_height / 2.0,
|
||||
region.top() - strip_height / 2.0,
|
||||
);
|
||||
press(&mut visual, toggle, 1);
|
||||
redraw(&mut visual);
|
||||
|
||||
Reference in New Issue
Block a user