Lots of owork on a calculator example, transparency, etc.

This commit is contained in:
2026-05-16 16:18:55 -04:00
parent e2c2563b7e
commit 6dcc2d0d00
40 changed files with 5783 additions and 125 deletions

View File

@@ -31,6 +31,11 @@ pub fn button() -> ButtonBuilder {
impl ButtonBuilder {
impl_props_methods!();
pub fn shadow(mut self, shadow: impl crate::converters::IntoShadow) -> Self {
self.props = self.props.shadow(shadow);
self
}
pub fn on_press(mut self, handler: impl Fn(&RoutedPointerEvent) + 'static) -> Self {
self.on_press = Some(Rc::new(handler));
self
@@ -44,6 +49,9 @@ impl ButtonBuilder {
pub fn children(mut self, children: impl Children) -> View {
let id = allocate_element_id();
self.props.element = self.props.element.id(id);
if let Some(widget_ref) = &self.props.widget_ref {
let _ = widget_ref.set(Some(id));
}
let had_style = self.props.partial_text_style.is_some();
if let Some(style) = self.props.partial_text_style.take() {
push_text_style(style);