Commit graph

799 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
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
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
Cory Forsstrom
b623f280ed
Add scroll_to operation for absolute scroll 2023-04-14 13:32:44 -07:00
Héctor Ramón Jiménez
db4b899fd2
Fix Wasm target for integration_wgpu 2023-04-13 06:03:44 +02:00
Héctor Ramón Jiménez
9410fb9827
Update env_logger in integration_wgpu example 2023-04-13 05:46:18 +02:00
Héctor Ramón Jiménez
b677345ac1
Get surface capabilities only once in iced_wgpu 2023-04-13 05:42:56 +02:00
Elham Aryanpur
d5453c62e9
Update wgpu to 0.15 2023-04-13 05:40:23 +02:00
Héctor Ramón Jiménez
250ba3a7f1
Remove text_input example 2023-04-12 04:19:54 +02:00
Héctor Ramón Jiménez
e6a93e960c
Rename on_change to on_input for TextInput 2023-04-12 04:19:45 +02:00
Dan Mishin
f10e936f00
Introduce disabled state for TextInput 2023-04-12 03:55:18 +02:00
Héctor Ramón Jiménez
0ed54346b0
Use Result::is_err in websocket example 2023-04-11 07:53:26 +02:00
Héctor Ramón Jiménez
5908205a62
Use 127.0.0.1 instead of localhost in websocket example 2023-04-11 07:48:30 +02:00
Héctor Ramón Jiménez
ae7e6b3d48
Implement subscription::channel and simplify unfold 2023-04-11 07:46:54 +02:00
Héctor Ramón Jiménez
45015e37d4
Fix current step in tour 2023-04-11 05:57:31 +02:00
Héctor Ramón Jiménez
aa0be30656
Move ICON_FONT constant in tour to text_input helper 2023-04-11 05:57:01 +02:00
Héctor Ramón Jiménez
c794d8ba78
Collapse Font import in tour example 2023-04-11 05:56:34 +02:00
Héctor Ramón Jiménez
cf9d8e0104
Rename IconPosition to Side in text_input 2023-04-11 05:54:51 +02:00
Héctor Ramón Jiménez
9852b4b364
Move Icon layout logic to layout in text_input
Also add `Icon::spacing` field.
2023-04-11 05:46:14 +02:00
Héctor Ramón Jiménez
0e2fc99eb8
Use f32 for Icon::size and remove unnecessary conversions 2023-04-11 05:13:56 +02:00
Casper Storm
898307e9ac
Removed text_input example in favor for Tour 2023-04-11 05:11:23 +02:00