Skip to content

Commit

Permalink
files: Fix label for recents
Browse files Browse the repository at this point in the history
  • Loading branch information
foxnne committed Jan 20, 2024
1 parent 5dee764 commit 42a129a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/editor/explorer/files.zig
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub fn draw() void {
while (i > 0) {
i -= 1;
const folder = pixi.state.recents.folders.items[i];
var label = std.fmt.allocPrintZ(pixi.state.allocator, "{s} {s}", .{ pixi.fa.folder, folder }) catch unreachable;
var label = std.fmt.allocPrintZ(pixi.state.allocator, "{s} {s}##{s}", .{ pixi.fa.folder, std.fs.path.basename(folder), folder }) catch unreachable;
defer pixi.state.allocator.free(label);

if (imgui.selectable(label)) {
Expand All @@ -170,10 +170,10 @@ pub fn draw() void {
}
}

// imgui.sameLineEx(0.0, 5.0 * pixi.content_scale[0]);
// imgui.pushStyleColorImVec4(imgui.Col_Text, pixi.state.theme.text_background.toImguiVec4());
// imgui.text(folder);
// imgui.popStyleColor();
imgui.sameLineEx(0.0, 5.0 * pixi.content_scale[0]);
imgui.pushStyleColorImVec4(imgui.Col_Text, pixi.state.theme.text_background.toImguiVec4());
imgui.text(folder);
imgui.popStyleColor();
}
}
}
Expand Down

0 comments on commit 42a129a

Please sign in to comment.