fix(sidebar): anchor submodules section to bottom
This commit is contained in:
@@ -495,6 +495,13 @@ void draw_sidebar(float width) {
|
||||
section(ICON_FA_DIAGRAM_PROJECT " WORKTREES", repo().worktrees, ICON_FA_COMPUTER,
|
||||
"Add worktree", "Worktree creation is not wired yet", SidebarItemKind::worktree, 2,
|
||||
section_heights[2], maximum_heights[2]);
|
||||
|
||||
const float submodules_body_height = section_open[3] && section_heights[3] >= ui(1.0f)
|
||||
? section_heights[3] + ui(5.0f)
|
||||
: 1.0f;
|
||||
const float submodules_block_height = ui(22.0f) + submodules_body_height;
|
||||
ImGui::SetCursorPosY(std::max(ImGui::GetCursorPosY(),
|
||||
ImGui::GetContentRegionMax().y - submodules_block_height));
|
||||
section(ICON_FA_CUBES " SUBMODULES", repo().submodules, ICON_FA_CUBES,
|
||||
"Add submodule", "Submodule creation is not wired yet", SidebarItemKind::submodule, 3,
|
||||
section_heights[3], maximum_heights[3]);
|
||||
|
||||
Reference in New Issue
Block a user