| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Co-Authored-By: Austin M. Reppert <austinmreppert@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...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.
|
| |
|
| |
|
|\
| |
| | |
Added scrollable style `focused` to be displayed when mouse is over the scrollable area
|
| | |
|
|/
|
|
|
| |
Implementing this generically in our `flex` logic has an exponential
cost. Let's explore other options!
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixed thumb "snapping" bug on scrollable when cursor is out of bounds.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*Total -- 967.49kb -> 703.99kb (27.24%)
/docs/images/radio.png -- 5.29kb -> 1.58kb (70.18%)
/docs/images/text_input.png -- 3.18kb -> 1.27kb (60.17%)
/docs/images/checkbox.png -- 5.56kb -> 2.22kb (60.17%)
/examples/color_palette/screenshot.png -- 102.74kb -> 43.75kb (57.42%)
/examples/tour/images/ferris.png -- 32.29kb -> 15.91kb (50.73%)
/docs/graphs/ecosystem.png -- 124.13kb -> 67.44kb (45.67%)
/docs/graphs/iced.png -- 97.75kb -> 53.27kb (45.5%)
/docs/graphs/native.png -- 57.90kb -> 33.67kb (41.85%)
/docs/images/text.png -- 4.95kb -> 2.99kb (39.61%)
/docs/graphs/foundations.png -- 18.19kb -> 11.19kb (38.46%)
/examples/scrollable/screenshot.png -- 144.78kb -> 102.53kb (29.18%)
/examples/svg/resources/tiger.svg -- 67.02kb -> 64.50kb (3.76%)
/docs/logo.svg -- 1.37kb -> 1.35kb (1.57%)
/docs/images/todos_desktop.jpg -- 302.36kb -> 302.33kb (0.01%)
Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
|
|
|
|
|
|
| |
Change dead links to updated ones.
Change/Convert all file links to relative links so they are branch
agnostic.
|
|
|
|
| |
Instead, always use a `StyleSheet`.
|
|\
| |
| |
| |
| | |
RamType0/RemoveUnnecessaryStringAllocationInExample
Remove unnecessary String allocation
|
| |
| |
| |
| | |
Remove unnecessary String allocation by passing &format! or &x.to_string as impl Into<String>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
... by issuing a new clip layer just for the scrollbar itself.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Rename `Config` to `Variant`
- Include `State` in `Variant` to avoid `zip`
- Break long string literal
- Split `style` module into its own file
|
|
|