Commit graph

116 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
905f2160e6
Move Theme type to iced_core 2024-03-07 00:14:41 +01:00
Héctor Ramón Jiménez
7c4bf70023
Simplify theming for Application 2024-03-06 21:27:03 +01:00
Héctor Ramón Jiménez
34e7c6593a
Use Style struct pattern instead of trait for all widgets 2024-03-06 20:30:58 +01:00
Héctor Ramón Jiménez
597a41cea7
Simplify theming for PickList, ComboBox, and Menu widgets 2024-03-06 17:08:57 +01:00
Héctor Ramón Jiménez
9b2fd64167
Simplify theming for PaneGrid widget 2024-03-06 15:49:06 +01:00
Héctor Ramón Jiménez
68c8f23f02
Simplify theming for TextEditor widget 2024-03-06 15:20:17 +01:00
Héctor Ramón Jiménez
69bc1df252
Simplify theming for Svg widget 2024-03-06 11:36:49 +01:00
Héctor Ramón Jiménez
40af65c3aa
Simplify theming for Toggler widget 2024-03-06 11:24:51 +01:00
Héctor Ramón Jiménez
a43afc791e
Simplify theming for Rule widget 2024-03-05 22:38:27 +01:00
Héctor Ramón Jiménez
5824ceb1fe
Simplify theming for ProgressBar widget 2024-03-05 22:13:55 +01:00
Héctor Ramón Jiménez
7d84c9c9c3
Simplify theming for Radio widget 2024-03-05 21:55:24 +01:00
Héctor Ramón Jiménez
d735209fc3
Move style types of slider to iced_widget 2024-03-05 21:23:14 +01:00
Héctor Ramón Jiménez
330a625205
Simplify theming for QRCode widget 2024-03-05 21:16:22 +01:00
Héctor Ramón Jiménez
704ec9cb5c
Simplify theming for TextInput widget 2024-03-05 15:53:59 +01:00
Héctor Ramón Jiménez
d681aaa57e
Simplify theming for Scrollable widget 2024-03-05 04:49:07 +01:00
Héctor Ramón Jiménez
29326215cc
Simplify theming for Container widget 2024-03-05 03:48:08 +01:00
Héctor Ramón Jiménez
1f0a0c235a
Simplify theming for Checkbox widget 2024-03-05 02:08:19 +01:00
Héctor Ramón Jiménez
f4a4845ddb
Simplify theming for Button widget 2024-03-04 20:42:37 +01:00
Héctor Ramón Jiménez
4130ae4be9
Simplify theming for Text widget 2024-03-04 19:32:13 +01:00
Héctor Ramón Jiménez
ce309db37b
Try new approach to theming for Slider 2024-03-04 03:57:03 +01:00
Héctor Ramón Jiménez
0eaaeaa517
Simplify scrollable styling API 2024-02-12 19:24:09 +01:00
dtzxporter
0f920e0435
Introduce an appearance for a scrollable, ability to customize the scrollbar gap.
Update scrollable.rs
2024-02-12 19:03:32 +01:00
Var Bhat
d5466c1861
Add Kanagawa, Moonfly, Nightfly, Oxocarbon themes 2024-02-11 02:50:38 +01:00
Var Bhat
4503e2ba7e
add tokyo night themes and palettes
Source: https://github.com/enkia/tokyo-night-vscode-theme
2024-02-11 02:50:38 +01:00
Var Bhat
3513a4ad56
add catppuccin themes 2024-02-11 02:50:35 +01:00
Héctor Ramón Jiménez
81bed94148
Use custom Application::style to enable transparency 2024-02-10 00:32:03 +01:00
Clark Moody
c2d82833a0
Styling for QR Code using theme framework 2024-02-09 23:43:01 +01:00
Giuliano Bellini s294739
ae3f5ba1a3
add border widths to toggler stylesheet 2024-02-07 20:29:24 +01:00
Héctor Ramón Jiménez
ed02c1b24d
Capitalize theme names in docs of Theme 2024-02-03 18:56:33 +01:00
Héctor Ramón Jiménez
17cb548e20
Use Theme::ALL for theme selector in styling example 2024-02-03 18:51:30 +01:00
Var Bhat
04b9dc4e2d
Add Dracula, Nord, Solarized and Grubvox variants to Theme 2024-02-03 18:29:25 +01:00
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
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
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
6582387579
Merge branch 'master' into text-editor 2023-10-27 03:58:45 +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
6448429103
Draft Editor API and TextEditor widget 2023-09-12 14:51:00 +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
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
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