remove context generic

This commit is contained in:
2025-08-25 18:53:21 -04:00
parent d4b1a56467
commit e8b255c8f9
17 changed files with 167 additions and 217 deletions

View File

@@ -5,8 +5,8 @@ pub struct Image {
handle: Option<TextureHandle>,
}
impl<Ctx> Widget<Ctx> for Image {
fn draw(&self, painter: &mut Painter<Ctx>) {
impl Widget for Image {
fn draw(&self, painter: &mut Painter) {
if let Some(handle) = &self.handle {
painter.draw_texture(handle);
} else {
@@ -20,7 +20,7 @@ impl<Ctx> Widget<Ctx> for Image {
}
}
pub fn image<Ctx>(image: impl LoadableImage) -> WidgetFnRet!(Image, Ctx) {
pub fn image(image: impl LoadableImage) -> WidgetFnRet!(Image) {
let image = match image.get_image() {
Ok(image) => Some(image),
Err(e) => {