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:
parent
fb3ef4bcf6
commit
ab6b3adb2b
3 changed files with 4 additions and 2 deletions
|
@ -2202,7 +2202,7 @@ impl Element<Editor> for EditorElement {
|
||||||
|
|
||||||
let invisible_symbol_font_size = self.style.text.font_size / 2.0;
|
let invisible_symbol_font_size = self.style.text.font_size / 2.0;
|
||||||
let invisible_symbol_style = RunStyle {
|
let invisible_symbol_style = RunStyle {
|
||||||
color: self.style.line_number,
|
color: self.style.whitespace,
|
||||||
font_id: self.style.text.font_id,
|
font_id: self.style.text.font_id,
|
||||||
underline: Default::default(),
|
underline: Default::default(),
|
||||||
};
|
};
|
||||||
|
|
|
@ -636,6 +636,7 @@ pub struct Editor {
|
||||||
pub composition_mark: HighlightStyle,
|
pub composition_mark: HighlightStyle,
|
||||||
pub jump_icon: Interactive<IconButton>,
|
pub jump_icon: Interactive<IconButton>,
|
||||||
pub scrollbar: Scrollbar,
|
pub scrollbar: Scrollbar,
|
||||||
|
pub whitespace: Color,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Deserialize, Default)]
|
#[derive(Clone, Deserialize, Default)]
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ColorScheme, Layer, StyleSets } from "../themes/common/colorScheme"
|
||||||
import { background, border, borderColor, foreground, text } from "./components"
|
import { background, border, borderColor, foreground, text } from "./components"
|
||||||
import hoverPopover from "./hoverPopover"
|
import hoverPopover from "./hoverPopover"
|
||||||
|
|
||||||
import { buildSyntax } from "../themes/common/syntax"
|
import { SyntaxHighlightStyle, buildSyntax } from "../themes/common/syntax"
|
||||||
|
|
||||||
export default function editor(colorScheme: ColorScheme) {
|
export default function editor(colorScheme: ColorScheme) {
|
||||||
let layer = colorScheme.highest
|
let layer = colorScheme.highest
|
||||||
|
@ -123,6 +123,7 @@ export default function editor(colorScheme: ColorScheme) {
|
||||||
renameFade: 0.6,
|
renameFade: 0.6,
|
||||||
unnecessaryCodeFade: 0.5,
|
unnecessaryCodeFade: 0.5,
|
||||||
selection: colorScheme.players[0],
|
selection: colorScheme.players[0],
|
||||||
|
whitespace: colorScheme.ramps.neutral(0.5).hex(),
|
||||||
guestSelections: [
|
guestSelections: [
|
||||||
colorScheme.players[1],
|
colorScheme.players[1],
|
||||||
colorScheme.players[2],
|
colorScheme.players[2],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue