Skip to content

Commit

Permalink
Refine styles and remove hunk-specific color manipulation
Browse files Browse the repository at this point in the history
Co-Authored-By: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
  • Loading branch information
2 people authored and rtfeldman committed Nov 21, 2024
1 parent 107f456 commit 0deaf3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
5 changes: 2 additions & 3 deletions crates/editor/src/hunk_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ impl Editor {
h_flex()
.id(cx.block_id)
.block_mouse_down()
// .h(cx.line_height())
.pr_5()
.w_full()
.justify_end()
Expand All @@ -470,10 +469,10 @@ impl Editor {
.rounded_b_lg()
.bg(cx.theme().colors().editor_background)
.shadow(smallvec::smallvec![gpui::BoxShadow {
color: gpui::hsla(0.0, 0.0, 0.0, 0.15),
color: gpui::hsla(0.0, 0.0, 0.0, 0.1),
blur_radius: px(1.0),
spread_radius: px(1.0),
offset: gpui::point(px(0.), px(2.0)),
offset: gpui::point(px(0.), px(1.5)),
}])
.when(!is_branch_buffer, |row| {
row.child(
Expand Down
30 changes: 0 additions & 30 deletions crates/ui/src/components/button/button_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,36 +85,6 @@ impl TintColor {
}
}

// To remove?

// fn added_hunk_color(cx: &WindowContext) -> Hsla {
// let mut created_color = cx.theme().status().git().created;
// created_color.fade_out(0.7);
// created_color
// }

// fn accept_hunk_color(cx: &WindowContext) -> Hsla {
// cx.theme()
// .colors()
// .editor_background
// .blend(added_hunk_color(cx))
// .opacity(1.0)
// }

// fn deleted_hunk_color(cx: &WindowContext) -> Hsla {
// let mut deleted_color = cx.theme().status().deleted;
// deleted_color.fade_out(0.7);
// deleted_color
// }

// fn discard_hunk_color(cx: &WindowContext) -> Hsla {
// cx.theme()
// .colors()
// .editor_background
// .blend(deleted_hunk_color(cx))
// .opacity(1.0)
// }

impl From<TintColor> for Color {
fn from(tint: TintColor) -> Self {
match tint {
Expand Down

0 comments on commit 0deaf3b

Please sign in to comment.