Commit graph

2792 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
335df2028d
Introduce scoped in widget::operation 2022-11-09 23:53:26 +01:00
Héctor Ramón Jiménez
11ec80dee2
Implement Operation::scrollable for widget::action::Map 2022-11-09 23:51:42 +01:00
Héctor Ramón Jiménez
1283f2153c
Implement Overlay::operate for overlay::element::Map 2022-11-09 23:50:23 +01:00
Héctor Ramón Jiménez
397f2910e0
Implement Operation::scrollable for element::Map 2022-11-09 23:48:54 +01:00
Héctor Ramón
af6f7945a9
Merge pull request #1519 from iced-rs/customizable-theme
Built-in `Theme` customization
2022-11-09 18:24:14 +01:00
Héctor Ramón Jiménez
925b78a75d
Fix redundant references in slider 2022-11-09 04:23:55 +01:00
Héctor Ramón Jiménez
84a1edecea
Use derive(Default) for theme types 2022-11-09 04:07:42 +01:00
Héctor Ramón Jiménez
18fb74f200
Introduce Custom variants for every style in the built-in Theme 2022-11-09 04:05:31 +01:00
Héctor Ramón
8102f96f12
Merge pull request #1518 from bungoboingo/fix/old_gl
Fixed issues with old GL versions ( <= 2.1 )
2022-11-08 23:23:58 +01:00
bungoboingo
9841d19381 Fixed issues with old GL versions ( <= 2.1 ) 2022-11-08 13:41:44 -08:00
Héctor Ramón
d9f408d1c2
Merge pull request #1504 from tarkah/feat/pane-grid-maximize
Add pane maximize / restore for `PaneGrid`
2022-11-08 18:12:06 +01:00
Cory Forsstrom
7de9d2475d Couple layout & content to avoid desync 2022-11-08 08:49:26 -08:00
Héctor Ramón
ac737cb6e9
Merge pull request #1494 from tarkah/fix/padding
Constrain padding to resolved inner / outer widget sizes
2022-11-08 04:39:55 +01:00
Héctor Ramón
acb520a4a8
Merge pull request #1505 from ids1024/weak-dep-feature
Combine `glow_default_system_font` and `default_system_font` features
2022-11-08 04:24:48 +01:00
Héctor Ramón Jiménez
04087b2a86
Remove redundant std::convert namespace in padding 2022-11-08 04:11:45 +01:00
Héctor Ramón Jiménez
24d031b51c
Cast to u16 first then divide by 2 in Padding::fit 2022-11-08 04:11:06 +01:00
Héctor Ramón Jiménez
914f099342
Rearrange layout code to improve readability 2022-11-08 04:04:01 +01:00
Héctor Ramón Jiménez
7476663069
Rename Padding::constrain to fit 2022-11-08 03:56:05 +01:00
Héctor Ramón
da2325d18d
Merge pull request #1507 from ids1024/rgba-svg
Don't convert svg to BGRA before passing to shader
2022-11-05 08:12:27 +01:00
Ian Douglas Scott
a250aab958 Don't convert svg to BGRA before passing to shader
Now that the shader is using RGBA, this incorrectly swaps the
components.
2022-11-04 23:25:01 -07:00
Héctor Ramón
370fa14efb
Merge pull request #1485 from ids1024/glow-image
Glow image rendering support; move image/svg code to iced_graphics
2022-11-05 04:37:59 +01:00
Héctor Ramón Jiménez
078cadfed0
Update image dependency to 0.24 2022-11-05 03:47:08 +01:00
Héctor Ramón Jiménez
7a24b4ba69
Replace texture_store and store with storage 2022-11-05 03:39:59 +01:00
Héctor Ramón Jiménez
0a23f518c7
Remove redundant features in iced_wgpu and iced_glow 2022-11-05 03:26:19 +01:00
Héctor Ramón Jiménez
d3b613df44
Remove unnecessary dependencies from iced_glow 2022-11-05 03:22:06 +01:00
Héctor Ramón Jiménez
438f97a6d0
Use RGBA texture for image and svg pipelines 2022-11-05 03:20:00 +01:00
Héctor Ramón Jiménez
8ce8d374b1
Refactor some image traits a bit
- Use `Size<u32>` were applicable.
- Rename `TextureStore` to `image::Storage`.
- Rename `TextureStoreEntry` to `image::storage::Entry`.
- Wire up `viewport_dimensions` to `iced_glow` for `Svg`.
2022-11-05 03:19:38 +01:00
Ian Douglas Scott
5575e6ea08
Add image/svg support to iced_glow
https://github.com/iced-rs/iced/issues/674

Uses image/svg support in `iced_graphics`. The is not currently using an
atlas, and uses one texture/draw per image. This should be good enough
for now; supporting images with glow is better than not supporting them,
and if something else performs better, that improvement can be made
without any change to the public API.
2022-11-05 03:19:38 +01:00
Ian Douglas Scott
2c7c42ee93
Move image/svg handling into iced_graphics
The `TextureStore` trait is implemented by the atlas, and can also be
implemented in the glow renderer or in a software renderer.

The API here may be improved in the future, but API stability is
presumably not a huge issue since these types will only be used by
renderer backends.
2022-11-05 03:19:37 +01:00
Héctor Ramón
7b12991728
Merge pull request #1453 from ids1024/cow
Use `Cow<'static, [u8]>` in image/svg, add constructors taking &[u8]`
2022-11-05 02:19:13 +01:00
Héctor Ramón
1632826c8e
Merge pull request #1443 from traxys/div_canvas
Allow to replace an element instead of append to body for web rendering
2022-11-05 01:56:25 +01:00
Héctor Ramón Jiménez
bc5986c7c6
Unify methods by leveraging Into<Cow> in image and svg 2022-11-05 01:53:24 +01:00
Héctor Ramón Jiménez
d8d57a800a
Allow providing a DOM identifier as a target for Wasm 2022-11-05 01:43:28 +01:00
traxys
ab2872fe2b
Allow to replace an element instead of append to body 2022-11-05 01:28:16 +01:00
Ian Douglas Scott
4d42ca2452 Combine glow_default_system_font and default_system_font features
Apparently "weak dependency features" have been stable since Rust
1.60.0, allowing a feature to enable a feature of a dependency only if
that dependency is enabled elsewhere. So having a separate feature for
this with glow is unnecessary now.

Also remove the `resolver` setting which is redundant on edition 2021.
2022-11-03 14:53:22 -07:00
Cory Forsstrom
853ff4bcf4 Add pub method for getting maximized value 2022-11-03 11:32:36 -07:00
Héctor Ramón
d222b5c8b0
Merge pull request #1448 from bungoboingo/fear/linear-gradients
Add linear gradient support to canvas widget
2022-11-03 18:57:09 +01:00
Cory Forsstrom
951fbc83ff Remove maximized when split occurs 2022-11-03 08:02:20 -07:00
Héctor Ramón Jiménez
f31c8f2504
Refactor imports of triangle modules in iced_glow and iced_wgpu 2022-11-03 06:05:23 +01:00
Héctor Ramón Jiménez
68cddd6468
Remove unnecessary pub(crate) in widget::canvas::frame 2022-11-03 06:05:06 +01:00
Héctor Ramón Jiménez
4ef778aff3
Refactor imports of widget::canvas::frame in iced_graphics 2022-11-03 06:01:34 +01:00
Héctor Ramón Jiménez
75b05ed42d
Move re-export in widget::canvas in iced_graphics 2022-11-03 06:00:32 +01:00
Héctor Ramón Jiménez
a8c3b2ddf7
Fix documentation example of Canvas
... so it makes sense when seen from the `iced` crate.
2022-11-03 05:59:13 +01:00
Héctor Ramón Jiménez
e9e2657791
Refactor imports in widget::canvas in iced_graphics 2022-11-03 05:57:22 +01:00
Héctor Ramón Jiménez
84d1b79fef
Move mesh::Style to triangle and reuse it in fill and stroke 2022-11-03 05:50:53 +01:00
Héctor Ramón Jiménez
e0bb707f1e
Export Gradient in iced_graphics root 2022-11-03 05:24:51 +01:00
Héctor Ramón Jiménez
0b806235f6
Remove blank line if layer::mesh in iced_graphics 2022-11-03 05:23:43 +01:00
Héctor Ramón Jiménez
610dae4877
Refactor exports in graphics::layer 2022-11-03 05:22:58 +01:00
Héctor Ramón Jiménez
e07344428d
Refactor imports in solar_system example 2022-11-03 05:19:58 +01:00
Héctor Ramón Jiménez
d8045e2dc3
Move Position and Location to gradient module 2022-11-03 05:15:32 +01:00