Commit graph

62 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
9ba9558429 Allow dead code explicitly in iced_web 2021-02-16 00:03:20 +01: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
Héctor Ramón
08e13e00f1
Merge pull request #292 from TomPridham/feature/accessibility-web
add some accessibility features to web widgets
2020-07-01 07:09:27 +02:00
Héctor Ramón Jiménez
ffd195cdb5 Fix empty id and name attributes in iced_web 2020-07-01 06:52:13 +02:00
Héctor Ramón Jiménez
f5e16312bf Update Slider docs in iced_web 2020-06-13 15:04:49 +02:00
Héctor Ramón Jiménez
6b4a4655c1 Make Slider value generic in iced_web 2020-06-13 14:59:09 +02:00
Sebastian Zivota
c3643eaf6d Add step member to slider widgets
Both the native and the web slider now have a member `step` to control
the least possible change of the slider's value. It defaults to 1.0
for all sliders and can be adjusted with the step method.
2020-06-11 00:18:24 +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
f7825fd936 Fix Checkbox and Radio API in iced_web 2020-04-14 07:41:35 +02:00
Héctor Ramón Jiménez
749a9588d7 Implement padding support for Container 2020-03-31 01:21:51 +02:00
Héctor Ramón Jiménez
99b5212550 Implement Column and Row changes in iced_web 2020-03-17 00:53:51 +01:00
Rowun Giles
ae123d8f14 Instantiate Column and Row with children 2020-03-16 10:08:37 +00:00
Héctor Ramón Jiménez
f719ba3f4e Add font-family to Text style in iced_web 2020-02-06 05:03:11 +01:00
Héctor Ramón Jiménez
57aed1d5c6 Implement TextInput::on_submit support in iced_web 2020-02-06 03:06:06 +01:00
Héctor Ramón Jiménez
282ae1dc9e Implement TextInput styling in iced_web 2020-02-06 02:37:49 +01:00
Héctor Ramón Jiménez
07e62ae5da Fix ProgressBar doc example in iced_web 2020-02-06 02:29:19 +01:00
Héctor Ramón Jiménez
cf3ca44210 Implement Container styling in iced_web 2020-02-06 02:24:18 +01:00
Héctor Ramón Jiménez
e953733323 Add style to TextInput in iced_web 2020-02-06 01:26:08 +01:00
Héctor Ramón Jiménez
8e83f3632c Fix Column and Row styling for iced_web 2020-02-06 01:25:46 +01:00
Héctor Ramón Jiménez
6c8fdfefbe Fix Checkbox styling in iced_web 2020-02-06 01:25:22 +01:00
Héctor Ramón Jiménez
38a35ab639 Fix Button styling in iced_web 2020-02-06 01:25:03 +01:00
Héctor Ramón Jiménez
f5228695a2 Implement ProgressBar widget in iced_web 2020-02-06 01:24:40 +01:00
Héctor Ramón Jiménez
58a7be0a31 Expose styling types for container in iced_web 2020-02-06 00:36:00 +01:00
Héctor Ramón Jiménez
b4a8471aa1 Expose styling types for radio in iced_web 2020-02-06 00:33:26 +01:00
Héctor Ramón Jiménez
abdae3a7ec Expose styling types for checkbox in iced_web 2020-02-06 00:31:52 +01:00
Héctor Ramón Jiménez
ce45ecc235 Expose missing widget modules in iced_web 2020-02-06 00:28:25 +01:00
Héctor Ramón Jiménez
9a7f7bfdf5 Expose styling types for scrollable in iced_web 2020-02-06 00:23:44 +01:00
Héctor Ramón Jiménez
c2dad29429 Expose styling types for slider in iced_web 2020-02-06 00:20:55 +01: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
28fd9feb40 Support styling for Button in iced_web 2020-02-05 01:04:46 +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
6d46833eb2 Support event subscriptions in iced_web
Also improves the overall web runtime, avoiding nested update loops.
2020-02-04 03:28:47 +01:00
Héctor Ramón Jiménez
361be7f6b7 Remove Message: Clone bound in some web widgets 2020-01-13 06:58:48 +01:00
Héctor Ramón Jiménez
a4e833e860 Merge branch 'master' into feature/shrink-by-default 2020-01-09 01:37:57 +01:00
Songtronix
0b663ca82a add(web): support password field 2020-01-03 16:41:16 +01:00
Héctor Ramón
26de688e68
Merge pull request #138 from hecrj/feature/empty-widget
`Space` widget
2019-12-31 10:36:06 +01:00
Héctor Ramón Jiménez
3a327e08e9 Rename Empty widget to Space 2019-12-30 21:33:27 +01:00
Héctor Ramón Jiménez
2ff0e48142 Make Row, Column, and Checkbox shrink by default 2019-12-30 21:00:27 +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
8426bf953c Implement Empty widget
It can be useful if you want to fill some space with nothing.
2019-12-30 19:20:59 +01:00
Héctor Ramón
441c6730e9
Merge pull request #128 from Gohla/fix_unnecessary_bound
Remove unnecessary bound in iced_web Container
2019-12-18 23:20:48 +01:00
Gabriel Konat
7bb1b81e79 Fix unnecessary bound in web. 2019-12-18 12:02:22 +01:00
Gabriel Konat
95988e8e25 Add several missing style attributes in iced_web. 2019-12-18 11:30:51 +01:00
Héctor Ramón Jiménez
e92ea48e88 Make Button::background generic 2019-12-05 01:57:35 +01:00
Héctor Ramón Jiménez
b2721661f5 Style Button min-width in iced_web 2019-11-24 11:03:55 +01:00