╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │597 var copyable_text = try ui.widget.CopyableText.init(allocator, session, &choices); │ │598 errdefer copyable_text.deinit(allocator); │ │599 try box.children.put(allocator, copyable_text.getFocus().id, .{ .widget = .{ .copyable_text = copyable_text }, .rect = null, .min_size = null });│ │600 - try addDetailGap(allocator, box); │ │600 }; │ │601 if (entry.fork_oid.len != 0) { │ │602 fields[field_count] = .{ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │603 + .selector = "from", │ │604 .text = entry.fork_oid, │ │605 .label = if (entry.no_changes) " object id of this patch (no changes) " else " object id of this patch ",│ │606 }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────╮ │608 } │ │609 if (entry.target_branch.len != 0) { │ │610 fields[field_count] = .{ │ │611 + .selector = "to", │ │612 .text = entry.target_branch, │ │613 .label = " target branch this patch will go to ", │ │614 .bottom_label = " (set by the url you push to above) ",│ ╰────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │616 field_count += 1; │ │617 } │ │618 │ │618 - for (fields[0..field_count], 0..) |field, i| { │ │619 - var copyable_text = try ui.widget.CopyableText.init(allocator, session, &.{field}); │ │619 + if (field_count > 0) { │ │620 + var copyable_text = try ui.widget.CopyableText.init(allocator, session, fields[0..field_count]); │ │621 errdefer copyable_text.deinit(allocator); │ │622 try box.children.put(allocator, copyable_text.getFocus().id, .{ .widget = .{ .copyable_text = copyable_text }, .rect = null, .min_size = null }); │ │622 - if (i + 1 < field_count) try addDetailGap(allocator, box); │ │623 + │ │624 + var spacer = try ui.widget.Spacer.init(allocator); │ │625 + errdefer spacer.deinit(allocator); │ │626 + try box.children.put(allocator, spacer.getFocus().id, .{ .widget = .{ .spacer = spacer }, .rect = null, .min_size = .{ .width = null, .height = 1 }, .max_size = .{ .width = null, .height = 1 } });│ │627 } │ │624 - if (entry.target_branch.len != 0) try addDetailGap(allocator, box); │ │628 } │ │629 │ │627 -fn addDetailGap(allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget)) !void { │ │628 - var spacer = try ui.widget.Spacer.init(allocator); │ │629 - errdefer spacer.deinit(allocator); │ │630 - try box.children.put(allocator, spacer.getFocus().id, .{ .widget = .{ .spacer = spacer }, .rect = null, .min_size = .{ .width = null, .height = 1 }, .max_size = .{ .width = null, .height = 1 } }); │ │631 -} │ │632 - │ │630 fn cloneDirectoryName(allocator: std.mem.Allocator, title: []const u8) ![]const u8 { │ │631 var name: [64]u8 = undefined; │ │632 var len: usize = 0; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯