Commit graph

1424 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
c153d11aa6 Draft strategy to reuse view result in event loop 2020-11-05 04:09:31 +01:00
Héctor Ramón
e6131783e9
Merge pull request #590 from Limeth/master
Fix lifetimes in `Layout::children`
2020-11-02 17:57:56 +01:00
Jakub Hlusička
1d51025993
Take self by value in Layout::children 2020-11-02 16:27:28 +01:00
Héctor Ramón
28280600d7
Merge pull request #592 from sum-elier/fix-window-icon-dimensionsmismatch-error
Fixes #591 DimensionsMismatch error message
2020-11-02 15:06:01 +01:00
sum-elier
2b1d438ad4 Fix DimensionsMismatch error message
The values passed to write! were shifted 1 to the left.

Fixes #591
2020-11-01 09:21:42 -05:00
Jakub Hlusička
4dc93e8138
Fix lifetimes in Layout::children 2020-10-31 16:51:11 +01:00
Héctor Ramón
f46431600c
Merge pull request #586 from hecrj/fix/subscription-map
Accept a function pointer in `Subscription::map`
2020-10-30 08:04:23 +01:00
Héctor Ramón
820abdc98e
Merge pull request #583 from Limeth/master
Add conversion functions to Size and Vector
2020-10-29 16:03:10 +01:00
Jakub Hlusička
16646ffc41
Apply suggestions 2020-10-29 14:57:37 +01:00
Héctor Ramón
b8825966d4
Merge pull request #533 from Kaiden42/gitignore
Fix: ignoring all `target` directories
2020-10-29 10:45:34 +01:00
Héctor Ramón Jiménez
dd1b1cac0a Accept a function pointer in Subscription::map
Instead of a closure, a function pointer can be hashed and used to
uniquely identify a particular `Subscription`.

This should fix a bug where two different instances of `Subscription`
producing the same output were not treated differently by the runtime,
causing one of them to be ignored.
2020-10-29 10:27:18 +01:00
Héctor Ramón
b40775fb74
Merge pull request #584 from hecrj/improvement/viewport-aware-drawing
Viewport aware drawing
2020-10-29 02:00:56 +01:00
Jakub Hlusička
9090fa6a22 Add conversion functions to Size and Vector 2020-10-28 15:33:38 +01:00
Héctor Ramón Jiménez
91b1886968 Fix Widget::draw for Rule 2020-10-28 06:21:07 +01:00
Héctor Ramón Jiménez
7f02765214 Draw only visible options in overlay::Menu 2020-10-28 06:21:07 +01:00
Héctor Ramón Jiménez
d328b07b39 Introduce viewport to Widget::draw
This should eventually allow us to only generate primitives that are
visible.
2020-10-28 06:21:07 +01:00
Héctor Ramón
8a3ce90959
Merge pull request #575 from clarkmoody/scrollable-width
Custom Scrollbar Width
2020-10-27 23:35:52 +01:00
Héctor Ramón Jiménez
2ca05520ba Update screenshot of scrollable example 2020-10-24 10:32:26 +02:00
Héctor Ramón Jiménez
ed458d33d9 Reduce contrast of dark theme in scrollable example 2020-10-24 10:29:19 +02:00
Héctor Ramón Jiménez
7f66345d5a Improve minor details in scrollable example
- Rename `Config` to `Variant`
- Include `State` in `Variant` to avoid `zip`
- Break long string literal
- Split `style` module into its own file
2020-10-24 10:29:12 +02:00
Héctor Ramón Jiménez
d3b04bf892 Introduce Eq requirement to build a PickList 2020-10-24 09:32:23 +02:00
Clark Moody
e43a46952a Add scrollable example program 2020-10-22 16:24:54 -05:00
Clark Moody
f05578c8f8 Update scrollbar logic and introduce outer_bounds 2020-10-22 16:05:44 -05:00
Clark Moody
09e67c5c27 Replace hard-coded params with struct members 2020-10-22 14:07:07 -05:00
Héctor Ramón
23647d2f50
Merge pull request #545 from MonliH/master
Remove outdated `Fill` comment for `Column` and `Row`
2020-10-17 21:12:09 +02:00
Héctor Ramón
befeb32225
Merge pull request #569 from hecrj/improvement/hide-null-executor
Remove `executor::Null` from the root public API
2020-10-17 21:10:59 +02:00
Héctor Ramón
5d0f7ba3fc
Merge pull request #568 from hecrj/improvement/early-clone-message-bounds
Require `Clone` for `Message` early when needed
2020-10-17 21:10:26 +02:00
Jonathan Li
461499dd62 Remove entirely 2020-10-17 10:48:31 -04:00
Héctor Ramón Jiménez
ae5a2502d6 Remove executor::Null from the root public API
Using an `Application` with `executor::Null` does not make sense, as the
whole purpose of an `Application` is to allow executing async actions.

When async actions are not needed, `Sandbox` should be used instead.
2020-10-17 08:46:16 +02:00
Héctor Ramón Jiménez
d7a5e54455 Require Clone for Message early when needed
Prior to this change, the widgets that needed a `Clone` bound on `Message` to
implement the `Widget` trait could be created with a non-cloneable `Message`.

As a consequence, the compiler complained only when actually trying to use the
`Widget` trait. Normally, this happens when trying to `push` the widget in a
container or turn it into an `Element`.

Furthermore, the compiler error in this case does not mention `Message` nor the
`Clone` bound, but instead complains about a missing `From` implementation.
Thus, it can easily cause confusion!

This change introduces `Clone` bounds in the main implementation of the
widgets that need it to properly implement the `Widget` trait. As a
result, the compiler complains early when trying to create one of these widgets
with a non-cloneable `Message` and explicitly mentions that the `Message` needs
to implement `Clone`.
2020-10-17 08:10:30 +02:00
Héctor Ramón
17f0db57c3
Merge pull request #563 from Limeth/master
Fix typo in `Row`'s and `Column`'s `hash_layout`
2020-10-14 02:48:51 +02:00
Jakub Hlusička
4910e03833 Fix typo in Row's and Column's hash_layout 2020-10-13 20:48:53 +02:00
Héctor Ramón
be61d84cae
Merge pull request #558 from Azorlogh/master
Adds From<Point> and From<Size> for [f32; 2]
2020-10-08 15:50:09 +02:00
Azorlogh
e6bcb7211f add From<Point> and From<Size> for [f32; 2] 2020-10-08 09:54:22 +02:00
Héctor Ramón
2e0ba65a20
Merge pull request #542 from aentity/winit_023
update to winit 0.23 api
2020-10-08 03:55:02 +02:00
Héctor Ramón Jiménez
16cd38a198 Keep KeyCode names synchronized with winit 2020-10-08 03:44:22 +02:00
aentity
159e8a6abc update to winit 0.23 api 2020-10-03 12:58:28 -07:00
Jonathan Li
7c24277210 Document better 2020-10-02 21:53:40 -04:00
Jonathan Li
8346209c37 Satify documented behaviour 2020-10-01 17:10:13 -04:00
Héctor Ramón
c393e450a1
Merge pull request #543 from twitchyliquid64/master
Fixes #539: Allow windows to be set always_on_top
2020-09-30 19:03:56 +02:00
Tom
f2247a70dc Fixes #539: Allow windows to be set always_on_top 2020-09-28 21:05:15 -07:00
Kaiden42
7dc762ad9c Fix ignoring all target directories 2020-09-18 09:57:46 +02:00
Héctor Ramón Jiménez
4f2962d73f Move version from Grid to GameOfLife struct 2020-09-12 20:35:51 +02:00
Héctor Ramón
49076c6ac2
Merge pull request #514 from hecrj/feature/error-handling
Error propagation
2020-09-08 20:03:37 +02:00
Héctor Ramón Jiménez
c1f79b40cf Make Application and Sandbox return a Result 2020-09-08 00:44:59 +02:00
Héctor Ramón
faa12382d4
Merge pull request #513 from hecrj/fix/custom-radio-size
Fix `Radio` border radius when using custom size
2020-09-06 19:56:19 +02:00
Héctor Ramón Jiménez
f6dda3b2f5 Fix Radio border radius when using custom size 2020-09-06 15:02:55 +02:00
Héctor Ramón
ff15ebc547
Merge pull request #500 from hecrj/update-wgpu
Update `wgpu` to `0.6` in `iced_wgpu`
2020-08-31 15:11:34 +02:00
Héctor Ramón Jiménez
44118263b5 Add labels to iced_wgpu internals 2020-08-31 14:41:41 +02:00
Héctor Ramón Jiménez
07880c392c Turn consecutive if-lets into pattern match 2020-08-27 19:40:42 +02:00