This commit is contained in:
2025-12-07 00:32:38 -05:00
parent 62aa02847a
commit 38266debb6
7 changed files with 68 additions and 32 deletions

View File

@@ -1,6 +1,9 @@
use super::*;
use crate::prelude::*;
// these methods should "not require any context" (require unit) because they're in core
event_ctx!(());
pub trait CoreWidget<W, Tag> {
fn pad(self, padding: impl Into<Padding>) -> impl WidgetFn<Pad>;
fn align(self, align: impl Into<Align>) -> impl WidgetFn<Aligned>;
@@ -100,8 +103,6 @@ impl<W: WidgetLike<Tag>, Tag> CoreWidget<W::Widget, Tag> for W {
}
fn scroll(self) -> impl WidgetIdFn<Scroll> {
event_ctx!(());
move |ui| {
Scroll::new(self.add(ui).any(), Axis::Y)
.on(CursorSense::Scroll, |ctx| {