Lots of owork on a calculator example, transparency, etc.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user