Commit graph

3405 commits

Author SHA1 Message Date
Héctor Ramón
e31582e59e
Merge pull request #1797 from bbb651/master
Make mouse::Button::Other take u16 instead of u8
2023-05-23 02:52:14 +02:00
bbb651
5802c95797
Make mouse::Button::Other take u16 instead of u8
On wayland keys correspond to <input-event-codes.h>,
and they are past the limit of u8, causing the
back and forward buttons to be 20 and 19 which definitely isn't right
(they should all be around 0x110..=0x117).
2023-05-23 02:35:38 +02:00
Héctor Ramón
f0073e3d71
Merge pull request #1861 from marienz/from-pointers
Support conversion from Fn trait to custom theme
2023-05-23 02:30:46 +02:00
Héctor Ramón
3d354fd337
Merge pull request #1840 from a1phyr/glam
Update `glam` to `0.24`
2023-05-22 20:12:46 +02:00
Benoît du Garreau
dee8ede5be Update glam to 0.24 2023-05-22 17:23:42 +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
9b5f32ee40
Rename invert -> swap 2023-05-19 12:15:44 +01:00
Joao Freitas
bc590e2d6f
Take pane state internally 2023-05-19 12:12:08 +01:00
Joao Freitas
0cb84c1c4c
Change name of hovered region style struct, reorder lines & export Appearance 2023-05-19 12:02:39 +01:00
Héctor Ramón
cc5d11f1a6
Merge pull request #1846 from bungoboingo/feat/background-gradients
[Feature] Gradients for Backgrounds
2023-05-19 04:37:58 +02:00
Héctor Ramón Jiménez
f7ed645edd
Remove redundant re-export in widget::canvas 2023-05-19 04:16:05 +02:00
Héctor Ramón Jiménez
9d25f98f0f
Reduce INITIAL_INSTANCES in wgpu::quad to 2_000 2023-05-19 04:07:53 +02:00
Héctor Ramón Jiménez
ccf7d1994f
Fix needless borrow in tiny_skia::backend 2023-05-19 04:05:31 +02:00
Héctor Ramón Jiménez
c888d0679b
Fix inconsistent pub use in wgpu::layer 2023-05-19 04:04:16 +02:00
Héctor Ramón Jiménez
e267e075cc
Avoid redundant buffer::Buffer import 2023-05-19 04:02:18 +02:00
Héctor Ramón Jiménez
f557b810f5
Keep image pipeline decoupled from quad in iced_wgpu 2023-05-19 03:59:58 +02:00
Héctor Ramón Jiménez
49353bc4ea
Inline into_gradient in tiny_skia::backend
... since it's not really reused anywhere else.
2023-05-19 03:53:23 +02:00
Héctor Ramón Jiménez
3d44de9547
Fix imports of geometry::style in iced_graphics 2023-05-19 03:49:42 +02: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
59663d2e45
Avoid packing gradient data for every vertex in iced_wgpu 2023-05-19 03:37:36 +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
Héctor Ramón
8e8b1e1eac
Merge pull request #1854 from wash2/fix-clear-blend-mode
fix: when clearing damaged surface with background color blend mode should be Source only
2023-05-16 12:42:36 +02:00
Ashley Wulber
a3f32ad201
fix: when clearing damaged surface with background color blend mode should be Source only 2023-05-15 13:40:52 -04:00
Héctor Ramón
9706c99310
Merge pull request #1847 from iced-rs/fix/image-atlas-race-condition
Fix race condition when growing an `image::Atlas`
2023-05-12 11:53:02 +02:00
Héctor Ramón Jiménez
0ef5ab6c84
Remove dbg! leftovers in image::atlas 2023-05-11 20:19:37 +02:00
Héctor Ramón Jiménez
f02f0c01ea
Fix race condition when growing an image::Atlas 2023-05-11 20:18:36 +02: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
cf434236e7
Enable doc_auto_cfg when generating documentation 2023-05-11 17:28:51 +02:00
Héctor Ramón Jiménez
3220d472ac
Fix document workflow for GitHub CI 2023-05-11 17:17:35 +02:00
Héctor Ramón
669f7cc74b
Merge pull request #1830 from iced-rs/advanced-text
Advanced text
2023-05-11 16:45:08 +02: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
b60194844a
Write missing documentation in iced_widget 2023-05-11 15:40:57 +02:00
Héctor Ramón Jiménez
de638f44a5
Write missing documentation in iced_wgpu 2023-05-11 15:37:56 +02:00
Héctor Ramón Jiménez
8622e998f2
Write missing documentation in iced_graphics 2023-05-11 15:25:58 +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
422b4dedcb
Merge pull request #1841 from wash2/fix-svg-color-filter
fix: tiny-skia svg premultiply final filtered color
2023-05-10 01:56:25 +02:00
Héctor Ramón
22e82dd5d6
Merge pull request #1842 from wash2/fix-typo
fix: border radius typo
2023-05-10 00:57:24 +02:00
Héctor Ramón Jiménez
1400b5187d
Fix bounds of PickList text label 2023-05-10 00:37:08 +02:00
Héctor Ramón Jiménez
f75b8bd9ec
Increase default LineHeight to Relative(1.3) 2023-05-10 00:13:51 +02:00
Héctor Ramón Jiménez
f0c87375d5
Add line_height to pick_list::Icon 2023-05-10 00:02:34 +02:00
Ashley Wulber
75439ff96e
fix: border radius typo 2023-05-09 16:37:01 -04:00
Ashley Wulber
3f1c8a8d28
fix: tiny-skia svg premultiply final filtered color 2023-05-09 14:57:50 -04:00
Héctor Ramón Jiménez
9a8b30d7e9
Clip text that exceeds section bounds in iced_wgpu 2023-05-08 16:41:42 +02:00
Héctor Ramón Jiménez
c6d9221ee4
Round paragraph position until we implement subpixel glyph positioning 2023-05-08 16:20:05 +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
16bf8fc762
Export Shaping and LineHeight in widget::text 2023-05-08 15:37:29 +02:00
Héctor Ramón Jiménez
b8c2cca384
Merge branch 'master' into advanced-text 2023-05-08 14:53:36 +02:00