diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2025-11-22 08:40:09 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2025-11-22 08:40:09 +0100 |
| commit | 5801d7253e199b842270476ee0af8d0d0d0f4dc9 (patch) | |
| tree | 80482c98341f26971bac872b9566e54891431c06 /src/panes/code_view.rs | |
| parent | chore: update deps (diff) | |
| download | iced-builder-5801d7253e199b842270476ee0af8d0d0d0f4dc9.tar.gz | |
chore: update iced_material
Diffstat (limited to 'src/panes/code_view.rs')
| -rw-r--r-- | src/panes/code_view.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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 } } }; |
