Commit graph

172 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
d0e94419b5
Use strong background for Secondary checkbox accent 2024-02-01 13:16:34 +01:00
Alexander van Saase
b5f1ca1695
Introduce support for disabling a checkbox 2024-02-01 13:16:28 +01:00
Héctor Ramón Jiménez
bf375587aa
Add Shadow to container::Appearance 2024-01-20 13:34:07 +01:00
Héctor Ramón Jiménez
e736038d5f
Add Shadow to button::Appearance 2024-01-20 13:32:19 +01:00
Héctor Ramón Jiménez
25f182f933
Introduce Border struct analogous to Shadow 2024-01-20 13:29:25 +01:00
Héctor Ramón
61e3d8502f
Merge pull request #2163 from hicaru/svg_hover
added svg hover, for styles impl
2024-01-18 03:46:13 +01:00
Héctor Ramón Jiménez
3850a46db6
Add Theme selector to layout example 2024-01-10 10:01:51 +01:00
Héctor Ramón Jiménez
d76705df29
Add explain toggle to layout example 2024-01-10 10:01:51 +01:00
Héctor Ramón Jiménez
81ecc4a67f
Add basic controls to layout example 2024-01-10 10:01:50 +01:00
hicaru
b54f27d30d added svg hover, for styles impl 2023-12-12 14:02:15 +05:00
Héctor Ramón Jiménez
625cd745f3
Write documentation for the new text APIs 2023-10-27 05:04:14 +02:00
Héctor Ramón Jiménez
6582387579
Merge branch 'master' into text-editor 2023-10-27 03:58:45 +02:00
Héctor Ramón Jiménez
f137d71e8f
Centralize clippy lints in .cargo/config.toml 2023-09-20 16:40:03 +02:00
Héctor Ramón Jiménez
42ed90bc6f
Fix clippy::default_trait_access 2023-09-20 04:51:08 +02:00
Héctor Ramón Jiménez
f806d001e6
Introduce new iced_highlighter subcrate 2023-09-19 20:48:50 +02:00
Yuri Astrakhan
c6554d9907 Chore: Apply clippy docs keyword quoting
Add quotes a number of doc strings like `sRGB`
2023-09-19 01:50:05 -04:00
Héctor Ramón Jiménez
76dc82e8e8
Draft Highlighter API 2023-09-17 15:29:14 +02:00
Héctor Ramón Jiménez
6448429103
Draft Editor API and TextEditor widget 2023-09-12 14:51:00 +02:00
Héctor Ramón Jiménez
f60884f6f8
Deny broken_intradoc_links and verify documentation in CI 2023-09-09 20:58:45 +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
832d9f1b01
Introduce theme::Custom::with_fn to generate completely custom themes 2023-09-03 01:34:13 +02:00
Héctor Ramón Jiménez
126aef88e7
Bump versions 🎉 2023-07-28 19:48:39 +02:00
Joao Freitas
e5c9dd54b3
Add ability to drag pane to the pane grid edges & optional style for dragged pane 2023-07-06 07:55:49 +02:00
Héctor Ramón Jiménez
ee0dd4c623
Change default styling of Slider to leverage rounded borders 2023-06-01 17:25:56 +02:00
Casper Storm
9902e77816 Add border_radius to slider rail 2023-06-01 10:46:33 +02:00
Clark Moody
2d21d0900e
Upgrade palette dependency 2023-05-25 23:44:31 +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
0cb84c1c4c
Change name of hovered region style struct, reorder lines & export Appearance 2023-05-19 12:02:39 +01: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
Ian Douglas Scott
47016a37df Do not require Copy for text StyleSheet::Style
For most widgets, `Style` only requires `Default`. A few require
`Clone`. Only this one requires `Copy`.

Some of the types in the default theme has a custom variant requiring
`Box<dyn Trait>`, or `Rc<dyn Trait>` to provide `Clone`, but this isn't
possible if `Copy` is required.

It would be good to also address the inconsistency of requiring `Clone`
in some places and not others.

This removes `style/src/text.rs` which is unused in this branch and thus
confusing. If there's a reason to keep it, that can be removed from the
change.
2023-04-28 10:14:15 -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
c79cc2d2b3
Bump versions 🎉 2023-04-13 08:41:09 +02:00
Héctor Ramón Jiménez
52c84c4975
Remove border_radius support for slider::Rail
Our current quad shader may produce weird-looking results with
non-integral scaling factors.
2023-04-13 05:53:40 +02:00
Héctor Ramón Jiménez
9b39a17628
Rename Rail::size to width 2023-04-12 05:27:32 +02:00
Héctor Ramón Jiménez
6e6804c5c9
Use a border_radius of 2.0 for slider rails in built-in theme 2023-04-12 05:25:27 +02:00
Héctor Ramón Jiménez
c2cc9a835d
Remove border_width support in slider::Rail 2023-04-12 05:21:46 +02:00
Night_Hunter
de51bc3f41
Introduce left and right colors for slider rails 2023-04-12 05:09:16 +02:00
Héctor Ramón Jiménez
1de794aabf
Fine-tune built-in styling of disabled TextInput 2023-04-12 04:34:37 +02:00
Dan Mishin
f10e936f00
Introduce disabled state for TextInput 2023-04-12 03:55:18 +02:00
Casper Storm
d24a4a4689
Changed Handle to Icon to be consistent 2023-04-11 05:11:23 +02:00
Casper Storm
bfc5db9009
Updated handle_color for focused state 2023-04-11 05:11:23 +02:00
Casper Storm
7b36984295
feat: added handle to text_input 2023-04-11 05:11:19 +02:00
Héctor Ramón Jiménez
dcccf7064d
Fix inconsistency in default implementation of scrollable::StyleSheet 2023-03-27 15:57:51 +02:00
Héctor Ramón Jiménez
c407b4504c
Introduce is_mouse_over_scrollbar to StyleSheet::hovered for Scrollable 2023-03-27 15:51:32 +02:00
Giuliano Bellini s294739
c337bf297d renamed scrollable styles 2023-03-25 01:05:56 +01:00