Commit graph

1146 commits

Author SHA1 Message Date
Cory Forsstrom
f608056c50
Add nested picklist to modal example 2023-06-14 09:27:28 +02:00
Cory Forsstrom
55dc3b5619
Introduce internal overlay::Nested for UserInterface 2023-06-14 09:25:30 +02:00
Nick Senger
290b47f312 refactor: remove unnecessary canvas complexity 2023-06-09 11:03:52 -07:00
Nick Senger
9d69af10cc comment: fix typo 2023-06-08 20:09:10 -07:00
Héctor Ramón Jiménez
733c2bd9f5
Use mouse::Cursor in integration example 2023-06-08 20:45:48 +02:00
Héctor Ramón Jiménez
aba98e4965
Extend cursor availability to the shell level 2023-06-08 20:35:40 +02:00
Héctor Ramón Jiménez
57db196c3a
Increase width of controls in pane_grid example 2023-06-08 20:23:47 +02:00
Héctor Ramón Jiménez
5c8cfb411e
Take Rectangle by value in Cursor API 2023-06-08 20:16:46 +02:00
Héctor Ramón Jiménez
34451bff18
Implement basic cursor availability 2023-06-08 20:11:59 +02:00
Bingus
05e238e9ed
Adjusted offscreen pass to be a render pass vs compute for compat with web-colors flag. 2023-06-08 10:10:26 -07:00
Nick Senger
0148cfc82b fix: RedrawRequest::NextFrame -> RedrawRequest::At() 2023-06-08 07:51:32 -07:00
Nick Senger
56eacdb358 comment: cleanup imports 2023-06-08 07:47:57 -07:00
Nick Senger
204c9d6f52 fix: rotation in terms of duration 2023-06-07 16:48:11 -07:00
Nick Senger
2ebc923197 feat: use lyon for easing 2023-06-07 15:42:13 -07:00
Nick Senger
cdfb8b3068 feat: add progress indicators example 2023-06-07 11:57:49 -07:00
Héctor Ramón Jiménez
78c0189824
Fix width of crop labels in screenshot example (again) 2023-06-06 16:36:20 +02:00
Héctor Ramón Jiménez
38582873b7
Rearrange controls of the screenshot example 2023-06-06 16:32:14 +02:00
Héctor Ramón Jiménez
5b5000e3ae
Introduce on_press_maybe helper for Button 2023-06-06 16:18:20 +02:00
Héctor Ramón Jiménez
5324928044
Wrap Screenshot::bytes in an Arc and implement AsRef<[u8]> 2023-06-06 16:14:42 +02:00
Héctor Ramón Jiménez
7adfaa88a6
Avoid iced_image import in screenshot example 2023-06-06 16:05:46 +02:00
Héctor Ramón Jiménez
c1021c7175
Fix punctuation in screenshot example 2023-06-06 15:59:56 +02:00
Héctor Ramón Jiménez
cd15f8305a
Fix width of crop labels in screenshot example 2023-06-06 15:59:36 +02:00
Héctor Ramón Jiménez
8820583cc0
Create numeric_input helper in screenshot example 2023-06-06 15:51:32 +02:00
Héctor Ramón Jiménez
5ed9452877
Use Container::Box in screenshot example 2023-06-06 15:39:29 +02:00
Bingus
233196eb14
Added offscreen rendering support for wgpu & tiny-skia exposed with the window::screenshot command. 2023-06-06 15:37:30 +02:00
Héctor Ramón Jiménez
faa7627ea4
Introduce web-colors feature flag to enable sRGB linear blending
This is how browsers perform color management. They treat
gamma-corrected sRGB colors as if they were linear RGB.

Correctness aside, this mode is introduced for legacy reasons. Most
UI/UX tooling uses this color management as well, and many have created
an intuition about how color should behave from interacting with a
browser.

This feature flag should facilitate application development with `iced`
in those cases.

More details: https://webcolorisstillbroken.com/
2023-05-31 21:31:58 +02:00
Héctor Ramón Jiménez
2a00aaa747
Use as_slice instead of as_ref in checkbox example 2023-05-25 23:48:42 +02:00
Clark Moody
2d21d0900e
Upgrade palette dependency 2023-05-25 23:44:31 +02:00
Casper Storm
25804d9e5a clean up rebase mistake 2023-05-23 19:42:01 +02:00
Casper Storm
1c86defab5 Extend border radius on relevant widgets 2023-05-23 14:50:29 +02:00
Marien Zwart
d20493c8a0
Support conversion from Fn trait to custom theme
...instead of just from function pointers.

I'm making this change not because I actually want to pass a closure,
but to make passing a single fixed function work. This commit also
simplifies the scrollable example slightly, and without the other half
of this change that simplified example fails to compile with:

```
error[E0277]: the trait bound `iced::theme::ProgressBar: From<for<'a> fn(&'a Theme) -> iced::widget::progress_bar::Appearance {progress_bar_custom_style}>` is not satisfied
   --> examples/scrollable/src/main.rs:292:28
    |
292 |                     .style(progress_bar_custom_style)
    |                      ----- ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<for<'a> fn(&'a Theme) -> iced::widget::progress_bar::Appearance {progress_bar_custom_style}>` is not implemented for `iced::theme::ProgressBar`
    |                      |
    |                      required by a bound introduced by this call
    |
    = help: the trait `From<for<'a> fn(&'a Theme) -> iced::widget::progress_bar::Appearance>` is implemented for `iced::theme::ProgressBar`
    = note: required for `for<'a> fn(&'a Theme) -> iced::widget::progress_bar::Appearance {progress_bar_custom_style}` to implement `Into<iced::theme::ProgressBar>`
note: required by a bound in `iced::widget::ProgressBar::<Renderer>::style`
   --> /home/marienz/src/iced/widget/src/progress_bar.rs:77:21
    |
77  |         style: impl Into<<Renderer::Theme as StyleSheet>::Style>,
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ProgressBar::<Renderer>::style`
```

This happens because `progress_bar_custom_style` by itself is a function
item, which is typically coerced to a function pointer when one is
needed, but not in this case. It is possible to work around this on the
caller's side, but especially since the compiler diagnostic for this is
a bit rough (see https://github.com/rust-lang/rust/issues/100116) let's
try to make it work out of the box.
2023-05-21 23:41:26 +10:00
Héctor Ramón
640e13943c
Merge pull request #1856 from jhff/pane_grid_split_with_dragged_pane
[Feature] Enhance PaneGrid to split panes by drag & drop
2023-05-19 17:16:22 +02:00
Joao Freitas
bc590e2d6f
Take pane state internally 2023-05-19 12:12:08 +01:00
Héctor Ramón Jiménez
10a8c599e6
Keep tour buttons solid
The gradients feel a bit out of place currently.
2023-05-19 03:48:25 +02:00
Héctor Ramón Jiménez
96aa0379d5
Implement custom helper for theme::Button 2023-05-19 03:43:11 +02:00
Héctor Ramón Jiménez
4c1a082f04
Remove Builder abstractions for gradients 2023-05-19 03:32:21 +02:00
Joao Freitas
99aa54cd88
Add pane_grid functionality to split a pane with another pane 2023-05-16 16:12:29 +01:00
Bingus
6551a0b2ab
Added support for gradients as background variants + other optimizations. 2023-05-11 11:13:44 -07:00
Héctor Ramón Jiménez
63d3fc6996
Remove OpenGL mentions in READMEs 2023-05-11 16:05:36 +02:00
Héctor Ramón Jiménez
dd04c0b070
Bundle tiny-skia backend together with iced_renderer 2023-05-10 22:23:11 +02:00
Héctor Ramón Jiménez
180cb073bd
Add line_height to checkbox::Icon 2023-05-08 16:19:28 +02:00
Héctor Ramón Jiménez
8e8808f0e1
Merge branch 'master' into advanced-text 2023-05-02 06:40:48 +02:00
Héctor Ramón Jiménez
edf3432bf5
Update glyphon and cosmic-text 2023-05-02 01:02:33 +02:00
Héctor Ramón Jiménez
4bd290afe7
Introduce text::Shaping enum and replace magic boolean 2023-05-02 01:02:32 +02:00
Héctor Ramón Jiménez
88d3247717
Fix build of integration example for Wasm target 2023-04-27 15:17:06 +02:00
Héctor Ramón Jiménez
cc20baad6f
Use find(..) instead of filter(..).next() 2023-04-21 21:46:02 +02:00
Héctor Ramón Jiménez
3f0c226b74
Use point-free notation 2023-04-21 21:36:30 +02:00
David Huculak
8122904ca4 wgpu 0.16 2023-04-20 21:28:47 -04:00
Héctor Ramón Jiménez
4bae457c37
Merge branch 'master' into advanced-text 2023-04-17 23:41:12 +02:00
Cory Forsstrom
6ad5e03d71
Add scrollable Viewport 2023-04-17 13:55:40 -07:00