Use Catalog approach for all widgets
This commit is contained in:
parent
e657dc2ecd
commit
f0ae9a0c38
30 changed files with 1134 additions and 919 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue