Add a theme entry for whitespace, use it to style whitespaces

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
Nate Butler 2023-05-05 10:37:29 -04:00 committed by Kirill Bulatov
parent fb3ef4bcf6
commit ab6b3adb2b
3 changed files with 4 additions and 2 deletions

View File

@ -2202,7 +2202,7 @@ impl Element<Editor> for EditorElement {
let invisible_symbol_font_size = self.style.text.font_size / 2.0;
let invisible_symbol_style = RunStyle {
color: self.style.line_number,
color: self.style.whitespace,
font_id: self.style.text.font_id,
underline: Default::default(),
};

View File

@ -636,6 +636,7 @@ pub struct Editor {
pub composition_mark: HighlightStyle,
pub jump_icon: Interactive<IconButton>,
pub scrollbar: Scrollbar,
pub whitespace: Color,
}
#[derive(Clone, Deserialize, Default)]

View File

@ -3,7 +3,7 @@ import { ColorScheme, Layer, StyleSets } from "../themes/common/colorScheme"
import { background, border, borderColor, foreground, text } from "./components"
import hoverPopover from "./hoverPopover"
import { buildSyntax } from "../themes/common/syntax"
import { SyntaxHighlightStyle, buildSyntax } from "../themes/common/syntax"
export default function editor(colorScheme: ColorScheme) {
let layer = colorScheme.highest
@ -123,6 +123,7 @@ export default function editor(colorScheme: ColorScheme) {
renameFade: 0.6,
unnecessaryCodeFade: 0.5,
selection: colorScheme.players[0],
whitespace: colorScheme.ramps.neutral(0.5).hex(),
guestSelections: [
colorScheme.players[1],
colorScheme.players[2],