Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
git: Change merge conflict button labels (#34297)
Danilo Leald65855c4a187
diff --git a/crates/git_ui/src/conflict_view.rs b/crates/git_ui/src/conflict_view.rsindex 8eadf70830f..c07b99b875b 100644--- a/crates/git_ui/src/conflict_view.rs+++ b/crates/git_ui/src/conflict_view.rs@@ -11,10 +11,7 @@ use gpui::{use language::{Anchor, Buffer, BufferId};use project::{ConflictRegion, ConflictSet, ConflictSetUpdate, ProjectItem as _};use std::{ops::Range, sync::Arc};-use ui::{- ActiveTheme, AnyElement, Element as _, StatefulInteractiveElement, Styled,- StyledTypography as _, Window, div, h_flex, rems,-};+use ui::{ActiveTheme, Element as _, Styled, Window, prelude::*};use util::{ResultExt as _, debug_panic, maybe};pub(crate) struct ConflictAddon {@@ -391,20 +388,15 @@ fn render_conflict_buttons(cx: &mut BlockContext,) -> AnyElement {h_flex()+ .id(cx.block_id).h(cx.line_height)- .items_end().ml(cx.margins.gutter.width)- .id(cx.block_id)- .gap_0p5()+ .items_end()+ .gap_1()+ .bg(cx.theme().colors().editor_background).child(- div()- .id("ours")- .px_1()- .child("Take Ours")- .rounded_t(rems(0.2))- .text_ui_sm(cx)- .hover(|this| this.bg(cx.theme().colors().element_background))- .cursor_pointer()+ Button::new("head", "Use HEAD")+ .label_size(LabelSize::Small).on_click({let editor = editor.clone();let conflict = conflict.clone();@@ -423,14 +415,8 @@ fn render_conflict_buttons(}),).child(- div()- .id("theirs")- .px_1()- .child("Take Theirs")- .rounded_t(rems(0.2))- .text_ui_sm(cx)- .hover(|this| this.bg(cx.theme().colors().element_background))- .cursor_pointer()+ Button::new("origin", "Use Origin")+ .label_size(LabelSize::Small).on_click({let editor = editor.clone();let conflict = conflict.clone();@@ -449,14 +435,8 @@ fn render_conflict_buttons(}),).child(- div()- .id("both")- .px_1()- .child("Take Both")- .rounded_t(rems(0.2))- .text_ui_sm(cx)- .hover(|this| this.bg(cx.theme().colors().element_background))- .cursor_pointer()+ Button::new("both", "Use Both")+ .label_size(LabelSize::Small).on_click({let editor = editor.clone();let conflict = conflict.clone();