Yuri Astrakhan
efd0ff6ded
Chore: Apply some minor clippy fixes
...
* Use `.elapsed()` for duration
* Use direct iteration without calling `.iter()` and the like
* order fields in the `Text` struct creation as declared
2023-09-19 01:52:25 -04:00
Héctor Ramón Jiménez
b8e5693a30
Merge branch 'master' into explicit-text-caching
2023-09-10 00:34:21 +02:00
Thomas
fbc9ef74c4
Change init_with_level to init in examples
2023-09-09 22:42:41 +02:00
Thomas
e562544807
Add logging for web in tour example
2023-09-09 14:09:48 +02:00
Héctor Ramón Jiménez
f468e25d0c
Use workspace dependencies and package inheritance
...
We are also taking this as a chance to synchronize
the versions of all the crates! Because of this, we
will skip the `0.11` version.
2023-09-04 13:08:17 +02:00
Héctor Ramón Jiménez
ed3454301e
Implement explicit text caching in the widget state tree
2023-08-30 04:31:21 +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
4c1a082f04
Remove Builder abstractions for gradients
2023-05-19 03:32:21 +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
4bae457c37
Merge branch 'master' into advanced-text
2023-04-17 23:41:12 +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
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
Héctor Ramón Jiménez
7b8b01f560
Use f32 in Length::Units and rename it to Fixed
2023-02-17 15:40:17 +01:00
13r0ck
42b1bfe66d
Fix: Clippy lint 'uninlined_format_args'
2023-01-27 14:02:48 -07:00
Héctor Ramón Jiménez
a07cb8588f
Reintroduce Element::explain
2022-08-26 20:04:02 +02:00
Héctor Ramón Jiménez
80688689aa
Draft widget operations
2022-07-28 02:46:51 +02:00
Héctor Ramón Jiménez
ff2519b1d4
Replace stateful widgets with new iced_pure API
2022-07-27 06:49:20 +02:00
Héctor Ramón Jiménez
3514bd1535
Add theme::Application styling support to Sandbox
2022-07-08 20:13:14 +02:00
Héctor Ramón Jiménez
1dd1a2f97f
Introduce StyleSheet for Text widget
2022-06-29 10:51:01 +02:00
Héctor Ramón Jiménez
3e8f4cdd13
Add "Theming" section to the tour example
2022-05-26 05:31:55 +02:00
Héctor Ramón Jiménez
3a820b45f3
Implement theme styling for Slider
2022-05-26 00:40:27 +02:00
Héctor Ramón Jiménez
664251f3f5
Draft first-class Theme support
...
RFC: https://github.com/iced-rs/rfcs/pull/6
2022-05-14 01:56:32 +02:00
Héctor Ramón Jiménez
c35496d80f
Merge branch 'master' into virtual-widgets
2022-03-07 15:29:43 +07:00
Héctor Ramón Jiménez
33b9b50883
Showcase only Contain, Cover, and Fill image modes in tour
2022-02-23 16:32:12 +07:00
Héctor Ramón Jiménez
6f6ce15a20
Keep using Ferris in the image section of the tour
...
Wide ferris is cute :3
2022-02-16 18:19:37 +07:00
Héctor Ramón Jiménez
c910e23919
Expose ContentFit in root
2022-02-16 18:19:37 +07:00
Héctor Ramón Jiménez
0aff444941
Rename Image::fit to content_fit
...
... just for consistency!
2022-02-16 18:19:37 +07:00
Emi Simpson
ca1fcdaf14
Add support for ContentFit for Image
2022-02-16 18:19:33 +07:00
Héctor Ramón Jiménez
ecb3df8e01
Expose reusable Button logic
...
... and reuse it in `iced_pure`!
2022-02-11 23:17:07 +07:00
Nathan Henrie
a88bf0fed7
Fix path to ferris.png
...
Fixes https://github.com/iced-rs/iced/issues/1156
2021-12-11 16:51:54 -07:00
Héctor Ramón Jiménez
e6627bb96d
Fix formatting with cargo fmt
2021-11-10 16:35:13 +07:00
Ram.Type-0
0245f289b2
Remove unnecessary String allocation
...
Remove unnecessary String allocation by passing &format! or &x.to_string as impl Into<String>
2021-11-02 00:05:25 +09:00
Héctor Ramón Jiménez
a0ad399622
Refactor alignment types into an alignment module
2021-09-20 15:14:08 +07:00
Héctor Ramón
d3d6f3efb3
Add some horizontal padding to toggler section in tour example
2021-06-03 20:35:26 +07:00
Kaiden42
be3ee9adf1
Add Toggler to tour example
2021-06-03 20:21:55 +07:00
Héctor Ramón Jiménez
f41eacc3dc
Use f32 for border_width and border_radius
2020-11-23 00:31:50 +01: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 Jiménez
c1f79b40cf
Make Application and Sandbox return a Result
2020-09-08 00:44:59 +02:00
Héctor Ramón Jiménez
4aed3ede92
Use generic Slider in tour example
2020-06-13 14:34:39 +02:00
Sebastian Zivota
c3643eaf6d
Add step member to slider widgets
...
Both the native and the web slider now have a member `step` to control
the least possible change of the slider's value. It defaults to 1.0
for all sliders and can be adjusted with the step method.
2020-06-11 00:18:24 +02:00
Héctor Ramón Jiménez
e11b5c614f
Revert "Target physical pixels for quads in iced_glow"
...
This reverts commit 45511a442f .
2020-05-28 22:57:30 +02:00
Héctor Ramón Jiménez
6de0a2c371
Use Sandbox in tour example
2020-05-28 22:50:40 +02:00