Commit graph

17 commits

Author SHA1 Message Date
Liam Murphy
11f29bca86
Use data urls instead of blob URLs
I didn't do this originally because I was half doing it in the first place to mess with Blob URLs, and it feels kinda wrong to be encoding it as base64 when that option is available. But not having memory leaks is more important.
2021-04-10 17:18:04 +10:00
Liam Murphy
99c56b9bff
fix: Don't rely on image handle not being dropped
It now causes a memory leak, though. :/
2021-03-21 15:34:20 +11:00
Liam Murphy
1d85b6e887
feat(web): Support in-memory image data
I had to create two methods which basically do the same thing, `from_memory` and `from_slice`, but `from_memory` takes ownership of the bytes to be compatible with `iced_native`.

Also, `Data` is incompatible, because if I stored the bytes in `Data` and created a new object URL every render, it would have caused a memory leak because bumpalo doesn't call destructors and there'd be no way to call URL.revokeObjectUrl on it. It's also more efficient this way.
2021-03-21 14:36:06 +11:00
Héctor Ramón Jiménez
01322f69a4 Use recently stabilized intra-doc links
See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
2020-11-26 02:05:43 +01:00
Héctor Ramón Jiménez
75464ad894 Use String::from_str_in in iced_web 2020-07-01 07:36:42 +02:00
Tom Pridham
852d59752e add some accessibility features to web widgets 2020-04-21 22:35:32 -06:00
Héctor Ramón Jiménez
ad13b466d2 Add From<String> for image::Handle in iced_web 2020-02-06 00:16:59 +01:00
Héctor Ramón Jiménez
9a06e481b7 Add Handle and Data to image in iced_web 2020-02-05 04:13:55 +01:00
Héctor Ramón Jiménez
0030bcbd33 Rename module style to css in iced_web 2020-02-05 00:23:22 +01:00
Héctor Ramón Jiménez
aecc3ad195 Add Length::FillPortion variant
It allows to specify the amount of available space an element should
take relative to other elements.
2019-12-30 19:33:27 +01:00
Héctor Ramón Jiménez
d0f79d2779 Make tour work with iced_web again 🎉
- Implements `TextInput`, `Scrollable`, and `Container`
- Adds basic style generation
2019-11-23 20:23:38 +01:00
Héctor Ramón Jiménez
65eb218d3d Move widgets from core to native and web
Also made fields private and improved `Renderer` traits.
2019-11-21 13:47:20 +01:00
Héctor Ramón Jiménez
f8a232c8af Remove generic handle in Image
For now, we will simply assume images will be loaded from a given path.
2019-10-22 23:20:24 +02:00
Héctor Ramón Jiménez
86dede4c4c Make example work on web and update READMEs 2019-09-21 13:38:14 +02:00
Héctor Ramón Jiménez
b9e0f74948 Create iced_core and iced_native 2019-09-20 19:15:31 +02:00
Héctor Ramón Jiménez
655978f480 Draft nodes for missing widgets 2019-09-15 18:53:13 +02:00
Héctor Ramón Jiménez
27ac85a9d9 Draft web runtime and widgets 2019-09-14 20:54:50 +02:00