diff options
Diffstat (limited to 'src/panes')
| -rw-r--r-- | src/panes/code_view.rs | 18 | ||||
| -rw-r--r-- | src/panes/style.rs | 12 |
2 files changed, 15 insertions, 15 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 } } }; 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() |
