From 8a2430090b11cb01d6c94d78a9def3f96d8a9a2d Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 21 Sep 2022 10:39:03 -0400 Subject: [PATCH] WIP Git gutter styling --- crates/editor/src/element.rs | 6 +++--- styles/src/styleTree/editor.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 4bc9f9a10b..82bd260819 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -567,7 +567,7 @@ impl EditorElement { let start_y = row as f32 * line_height + offset - scroll_top; let end_y = start_y + line_height; - let width = 0.4 * line_height; + let width = 0.275 * line_height; let highlight_origin = bounds.origin() + vec2f(-width, start_y); let highlight_size = vec2f(width * 2., end_y - start_y); let highlight_bounds = RectF::new(highlight_origin, highlight_size); @@ -589,7 +589,7 @@ impl EditorElement { let start_y = start_row as f32 * line_height - scroll_top; let end_y = end_row as f32 * line_height - scroll_top; - let width = 0.22 * line_height; + let width = 0.12 * line_height; let highlight_origin = bounds.origin() + vec2f(-width, start_y); let highlight_size = vec2f(width * 2., end_y - start_y); let highlight_bounds = RectF::new(highlight_origin, highlight_size); @@ -598,7 +598,7 @@ impl EditorElement { bounds: highlight_bounds, background: Some(color), border: Border::new(0., Color::transparent_black()), - corner_radius: 0.2 * line_height, + corner_radius: 0.05 * line_height, }); } diff --git a/styles/src/styleTree/editor.ts b/styles/src/styleTree/editor.ts index 29d6857964..bd01c3b845 100644 --- a/styles/src/styleTree/editor.ts +++ b/styles/src/styleTree/editor.ts @@ -60,9 +60,9 @@ export default function editor(theme: Theme) { indicator: iconColor(theme, "secondary"), verticalScale: 0.618 }, - diffBackgroundDeleted: theme.ramps.red(0.3).hex(), - diffBackgroundInserted: theme.ramps.green(0.3).hex(), - diffBackgroundModified: theme.ramps.blue(0.3).hex(), + diffBackgroundDeleted: theme.iconColor.error, + diffBackgroundInserted: theme.iconColor.ok, + diffBackgroundModified: theme.iconColor.warning, documentHighlightReadBackground: theme.editor.highlight.occurrence, documentHighlightWriteBackground: theme.editor.highlight.activeOccurrence, errorColor: theme.textColor.error,