summaryrefslogtreecommitdiffstats
path: root/examples/pane_grid
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2024-05-23 13:29:45 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2024-05-23 13:29:45 +0200
commitd8ba6b0673a33724a177f3a1ba59705527280142 (patch)
tree89482c8d1e3a03e00b3a8151abbb81e30ae5898c /examples/pane_grid
parent72ed8bcc8def9956e25f3720a3095fc96bb2eef0 (diff)
parent468794d918eb06c1dbebb33c32b10017ad335f05 (diff)
downloadiced-d8ba6b0673a33724a177f3a1ba59705527280142.tar.gz
iced-d8ba6b0673a33724a177f3a1ba59705527280142.tar.bz2
iced-d8ba6b0673a33724a177f3a1ba59705527280142.zip
Merge branch 'master' into feat/text-macro
Diffstat (limited to 'examples/pane_grid')
-rw-r--r--examples/pane_grid/src/main.rs32
1 files changed, 9 insertions, 23 deletions
diff --git a/examples/pane_grid/src/main.rs b/examples/pane_grid/src/main.rs
index 9e78ad0b..6b5bd332 100644
--- a/examples/pane_grid/src/main.rs
+++ b/examples/pane_grid/src/main.rs
@@ -290,10 +290,8 @@ fn view_content<'a>(
.align_items(Alignment::Center);
container(scrollable(content))
- .width(Length::Fill)
- .height(Length::Fill)
+ .center_y(Length::Fill)
.padding(5)
- .center_y()
.into()
}
@@ -336,39 +334,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,
@@ -379,13 +368,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,