git_ui: Clean up the commit view UI (#44162)
This commit is contained in:
@@ -20090,6 +20090,11 @@ impl Editor {
|
||||
self.show_indent_guides
|
||||
}
|
||||
|
||||
pub fn disable_indent_guides(&mut self) -> Option<bool> {
|
||||
self.show_indent_guides = Some(false);
|
||||
self.show_indent_guides
|
||||
}
|
||||
|
||||
pub fn toggle_line_numbers(
|
||||
&mut self,
|
||||
_: &ToggleLineNumbers,
|
||||
|
||||
@@ -3915,6 +3915,8 @@ impl EditorElement {
|
||||
) -> impl IntoElement {
|
||||
let editor = self.editor.read(cx);
|
||||
let multi_buffer = editor.buffer.read(cx);
|
||||
let is_read_only = self.editor.read(cx).read_only(cx);
|
||||
|
||||
let file_status = multi_buffer
|
||||
.all_diff_hunks_expanded()
|
||||
.then(|| editor.status_for_buffer_id(for_excerpt.buffer_id, cx))
|
||||
@@ -3967,7 +3969,7 @@ impl EditorElement {
|
||||
.gap_1p5()
|
||||
.when(is_sticky, |el| el.shadow_md())
|
||||
.border_1()
|
||||
.map(|div| {
|
||||
.map(|border| {
|
||||
let border_color = if is_selected
|
||||
&& is_folded
|
||||
&& focus_handle.contains_focused(window, cx)
|
||||
@@ -3976,7 +3978,7 @@ impl EditorElement {
|
||||
} else {
|
||||
colors.border
|
||||
};
|
||||
div.border_color(border_color)
|
||||
border.border_color(border_color)
|
||||
})
|
||||
.bg(colors.editor_subheader_background)
|
||||
.hover(|style| style.bg(colors.element_hover))
|
||||
@@ -4056,13 +4058,15 @@ impl EditorElement {
|
||||
})
|
||||
.take(1),
|
||||
)
|
||||
.child(
|
||||
h_flex()
|
||||
.size_3()
|
||||
.justify_center()
|
||||
.flex_shrink_0()
|
||||
.children(indicator),
|
||||
)
|
||||
.when(!is_read_only, |this| {
|
||||
this.child(
|
||||
h_flex()
|
||||
.size_3()
|
||||
.justify_center()
|
||||
.flex_shrink_0()
|
||||
.children(indicator),
|
||||
)
|
||||
})
|
||||
.child(
|
||||
h_flex()
|
||||
.cursor_pointer()
|
||||
|
||||
Reference in New Issue
Block a user