refactor(ui): increase layout spacing

This commit is contained in:
2026-06-18 18:40:35 -05:00
parent 686a90d999
commit da475f2608
2 changed files with 12 additions and 5 deletions

View File

@@ -99,9 +99,14 @@ void apply_style(float scale) {
style.FrameRounding = 3.0f;
style.PopupRounding = 4.0f;
style.ScrollbarRounding = 3.0f;
style.FramePadding = {8.0f, 5.0f};
style.ItemSpacing = {8.0f, 6.0f};
style.WindowPadding = {8.0f, 8.0f};
style.WindowPadding = {10.0f, 9.0f};
style.FramePadding = {9.0f, 6.0f};
style.CellPadding = {10.0f, 6.0f};
style.ItemSpacing = {9.0f, 7.0f};
style.ItemInnerSpacing = {7.0f, 5.0f};
style.IndentSpacing = 19.0f;
style.ScrollbarSize = 13.0f;
style.GrabMinSize = 10.0f;
style.Colors[ImGuiCol_Text] = ImVec4(0.89f, 0.91f, 0.94f, 1.0f);
style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.53f, 0.58f, 0.66f, 1.0f);
style.Colors[ImGuiCol_WindowBg] = ImVec4(0.100f, 0.116f, 0.145f, 1.0f);
@@ -210,6 +215,7 @@ void section(const char* label, const std::vector<std::string>& items, const cha
}
}
ImGui::Separator();
ImGui::Dummy({0, ui(2.0f)});
}
struct BranchNode {
@@ -279,6 +285,7 @@ void branch_section(const char* label, const std::vector<std::string>& branches,
ImGui::Unindent(ui(17.0f));
}
ImGui::Separator();
ImGui::Dummy({0, ui(2.0f)});
}
void draw_sidebar(float width) {
@@ -356,7 +363,7 @@ void draw_commit_table() {
});
if (!message_matches && !ref_matches) continue;
}
ImGui::TableNextRow(0, ui(28.0f));
ImGui::TableNextRow(0, ui(31.0f));
ImGui::TableSetColumnIndex(0);
std::string row_id = "##commit" + std::to_string(i);
if (ImGui::Selectable(row_id.c_str(), repo().selected_commit == i,

View File

@@ -32,7 +32,7 @@ void GraphRenderer::drawRow(int row, const CommitInfo& commit,
const std::vector<CommitInfo>& commits, AvatarCache* avatars) const {
ImDrawList* draw = ImGui::GetWindowDrawList();
const ImVec2 origin = ImGui::GetCursorScreenPos();
constexpr float logical_row_height = 28.0f;
constexpr float logical_row_height = 31.0f;
const float row_height = px(logical_row_height);
const float lane_spacing = px(20.0f);
const float x = origin.x + px(15.0f) + lane_spacing * commit.lane;