commit view: Fix layout shift while loading commit (#44548)
Fixes a few cases where the commit view would layout shift as the diff loaded. This was caused by: - Adding the commit message buffer after all the diff files - Using the gutter dimensions from the last frame for the avatar spacing Release Notes: - commit view: Fix layout shift while loading commit --------- Co-authored-by: MrSubidubi <dev@bahn.sh>
This commit is contained in:
co-authored by
MrSubidubi
parent
dd431631b4
commit
21f7e6a9e6
@@ -174,17 +174,13 @@ impl Render for QuickActionBar {
|
||||
.as_ref()
|
||||
.is_some_and(|menu| matches!(menu.origin(), ContextMenuOrigin::QuickActionBar))
|
||||
};
|
||||
let code_action_element = if is_deployed {
|
||||
editor.update(cx, |editor, cx| {
|
||||
if let Some(style) = editor.style() {
|
||||
editor.render_context_menu(style, MAX_CODE_ACTION_MENU_LINES, window, cx)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
let code_action_element = is_deployed
|
||||
.then(|| {
|
||||
editor.update(cx, |editor, cx| {
|
||||
editor.render_context_menu(MAX_CODE_ACTION_MENU_LINES, window, cx)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
None
|
||||
};
|
||||
.flatten();
|
||||
v_flex()
|
||||
.child(
|
||||
IconButton::new("toggle_code_actions_icon", IconName::BoltOutlined)
|
||||
|
||||
Reference in New Issue
Block a user