summaryrefslogtreecommitdiffstats
path: root/examples/pane_grid
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-24 05:03:09 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-24 05:03:09 +0100
commitf0ae9a0c38c2532220a7460916604914db94c078 (patch)
treea1f0d1732108fa87ce4a63e76def9c38c8804d5d /examples/pane_grid
parente657dc2ecd2ffa72c0abd87f9a59dcc1acbc7083 (diff)
downloadiced-f0ae9a0c38c2532220a7460916604914db94c078.tar.gz
iced-f0ae9a0c38c2532220a7460916604914db94c078.tar.bz2
iced-f0ae9a0c38c2532220a7460916604914db94c078.zip
Use `Catalog` approach for all widgets
Diffstat (limited to 'examples/pane_grid')
-rw-r--r--examples/pane_grid/src/main.rs28
1 files changed, 8 insertions, 20 deletions
diff --git a/examples/pane_grid/src/main.rs b/examples/pane_grid/src/main.rs
index 829996d8..17112785 100644
--- a/examples/pane_grid/src/main.rs
+++ b/examples/pane_grid/src/main.rs
@@ -338,39 +338,30 @@ mod style {
use iced::widget::container;
use iced::{Border, Theme};
- pub fn title_bar_active(
- theme: &Theme,
- _status: container::Status,
- ) -> container::Appearance {
+ pub fn title_bar_active(theme: &Theme) -> container::Style {
let palette = theme.extended_palette();
- container::Appearance {
+ container::Style {
text_color: Some(palette.background.strong.text),
background: Some(palette.background.strong.color.into()),
..Default::default()
}
}
- pub fn title_bar_focused(
- theme: &Theme,
- _status: container::Status,
- ) -> container::Appearance {
+ pub fn title_bar_focused(theme: &Theme) -> container::Style {
let palette = theme.extended_palette();
- container::Appearance {
+ container::Style {
text_color: Some(palette.primary.strong.text),
background: Some(palette.primary.strong.color.into()),
..Default::default()
}
}
- pub fn pane_active(
- theme: &Theme,
- _status: container::Status,
- ) -> container::Appearance {
+ pub fn pane_active(theme: &Theme) -> container::Style {
let palette = theme.extended_palette();
- container::Appearance {
+ container::Style {
background: Some(palette.background.weak.color.into()),
border: Border {
width: 2.0,
@@ -381,13 +372,10 @@ mod style {
}
}
- pub fn pane_focused(
- theme: &Theme,
- _status: container::Status,
- ) -> container::Appearance {
+ pub fn pane_focused(theme: &Theme) -> container::Style {
let palette = theme.extended_palette();
- container::Appearance {
+ container::Style {
background: Some(palette.background.weak.color.into()),
border: Border {
width: 2.0,