diff options
Diffstat (limited to '')
| -rw-r--r-- | src/main.rs | 2 | ||||
| -rw-r--r-- | src/panes/code_view.rs | 18 | ||||
| -rw-r--r-- | src/panes/style.rs | 12 | ||||
| -rw-r--r-- | src/widget/button.rs | 8 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/main.rs b/src/main.rs index 1908591..55b647c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -526,7 +526,7 @@ impl IcedBuilder { .padding([5, 10]) .width(Length::Fill) .style(|theme: &Theme| { - let color = theme.colors().surface.on_surface; + let color = theme.colors().surface.text; container::Style { background: Some( disabled_container(color).into(), diff --git a/src/panes/code_view.rs b/src/panes/code_view.rs index 2dc27e9..dbc7ada 100644 --- a/src/panes/code_view.rs +++ b/src/panes/code_view.rs @@ -40,7 +40,7 @@ fn highlight_style(theme: &Theme, scope: &Scope) -> Format<Font> { | Scope::EscapeSequence => colors.tertiary.color, // Regex deserves distinct treatment, often looking like code but acting like a string - Scope::RegExp => colors.secondary.secondary_container, + Scope::RegExp => colors.secondary.container, // Numeric literals and constants (user- or built-in) Scope::Number | Scope::BuiltinConstant | Scope::UserDefinedConstant => { @@ -54,7 +54,7 @@ fn highlight_style(theme: &Theme, scope: &Scope) -> Format<Font> { // Function and method declarations Scope::FunctionName | Scope::LibraryFunction => { - colors.primary.primary_container + colors.primary.container } // Keywords and language operators @@ -62,14 +62,14 @@ fn highlight_style(theme: &Theme, scope: &Scope) -> Format<Font> { | Scope::KeywordOperator | Scope::KeywordOther | Scope::Operator - | Scope::Continuation => colors.secondary.secondary_container, + | Scope::Continuation => colors.secondary.container, // Module/class/namespace declarations Scope::Class | Scope::LibraryClass | Scope::StorageType | Scope::StorageModifier - | Scope::Storage => colors.tertiary.tertiary_container, + | Scope::Storage => colors.tertiary.container, // Import paths or directives Scope::Import => colors.tertiary.color, @@ -78,7 +78,7 @@ fn highlight_style(theme: &Theme, scope: &Scope) -> Format<Font> { Scope::Exception | Scope::Invalid => colors.error.color, // HTML-like tags or markup tokens - Scope::TagName | Scope::TagStart => colors.primary.primary_container, + Scope::TagName | Scope::TagStart => colors.primary.container, // Special constants, macros, etc. Scope::Special | Scope::SupportConstruct => { @@ -91,7 +91,7 @@ fn highlight_style(theme: &Theme, scope: &Scope) -> Format<Font> { } // Fallback - Scope::Other => colors.surface.on_surface_variant, + Scope::Other => colors.surface.text_variant, // Handle user-defined custom scope Scope::Custom { name, .. } => { @@ -102,12 +102,12 @@ fn highlight_style(theme: &Theme, scope: &Scope) -> Format<Font> { } else if name.contains("string") { colors.tertiary.color } else if name.contains("keyword") { - colors.secondary.secondary_container + colors.secondary.container } else if name.contains("function") { - colors.primary.primary_container + colors.primary.container } else { // Default fallback for unknown custom scopes - colors.surface.on_surface_variant + colors.surface.text_variant } } }; diff --git a/src/panes/style.rs b/src/panes/style.rs index df21a04..f2e3251 100644 --- a/src/panes/style.rs +++ b/src/panes/style.rs @@ -6,8 +6,8 @@ pub fn title_bar(theme: &Theme) -> Style { let surface = theme.colors().surface; Style { - text_color: Some(surface.on_surface), - background: Some(Background::Color(surface.surface_container.high)), + text_color: Some(surface.text), + background: Some(Background::Color(surface.container.high)), ..Default::default() } } @@ -16,10 +16,10 @@ pub fn pane_active(theme: &Theme) -> Style { let surface = theme.colors().surface; Style { - background: Some(Background::Color(surface.surface_container.low)), + background: Some(Background::Color(surface.container.low)), border: Border { width: 1.0, - color: surface.surface_container.high, + color: surface.container.high, ..Border::default() }, ..Default::default() @@ -30,10 +30,10 @@ pub fn pane_focused(theme: &Theme) -> Style { let surface = theme.colors().surface; Style { - background: Some(Background::Color(surface.surface_container.low)), + background: Some(Background::Color(surface.container.low)), border: Border { width: 2.0, - color: surface.surface_container.high, + color: surface.container.high, ..Border::default() }, ..Default::default() diff --git a/src/widget/button.rs b/src/widget/button.rs index 5a1975b..e255808 100644 --- a/src/widget/button.rs +++ b/src/widget/button.rs @@ -3,11 +3,11 @@ use iced_material::Theme; use iced_material::button::styled; pub fn danger(theme: &Theme, status: Status) -> Style { - let primary = theme.colors().error; + let error = theme.colors().error; - let foreground = primary.on_error; - let background = primary.color; - let disabled = theme.colors().surface.on_surface; + let foreground = error.text; + let background = error.color; + let disabled = theme.colors().surface.text; let shadow_color = theme.colors().shadow; |
