Use Catalog approach for all widgets

This commit is contained in:
Héctor Ramón Jiménez 2024-03-24 05:03:09 +01:00
parent e657dc2ecd
commit f0ae9a0c38
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
30 changed files with 1134 additions and 919 deletions

View file

@ -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,