remove context generic
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user