Skip to content

Commit 998ae06

Browse files
committed
Add padding
1 parent b026f81 commit 998ae06

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main.zig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,16 @@ pub fn main() !void {
8787
// zgui.setNextWindowSize(.{ .w = 420, .h = 300, .cond = .always });
8888

8989
if (zgui.begin("invisible_title", .{ .flags = .{ .no_title_bar = true, .no_resize = true, .no_background = true } })) {
90+
const padding = 15;
9091
const min_width = 855;
9192

92-
zgui.setNextItemWidth(@max(zgui.calcTextSize(settings.input_folder_path, .{})[0], min_width));
93+
zgui.setNextItemWidth(@max(zgui.calcTextSize(settings.input_folder_path, .{})[0] + padding, min_width));
9394
if (zgui.inputTextWithHint("Input/ folder path", .{ .hint = "Copy-paste a path from File Explorer here", .buf = &input_folder_path_mut })) {
9495
settings.input_folder_path = std.mem.span(@as([*:0]u8, &input_folder_path_mut));
9596
try writeSettings(settings);
9697
}
9798

98-
zgui.setNextItemWidth(@max(zgui.calcTextSize(settings.output_folder_path, .{})[0], min_width));
99+
zgui.setNextItemWidth(@max(zgui.calcTextSize(settings.output_folder_path, .{})[0] + padding, min_width));
99100
if (zgui.inputTextWithHint("Mods/ folder path", .{ .hint = "Copy-paste a path from File Explorer here", .buf = &output_folder_path_mut })) {
100101
settings.output_folder_path = std.mem.span(@as([*:0]u8, &output_folder_path_mut));
101102
try writeSettings(settings);
@@ -162,7 +163,7 @@ pub fn main() !void {
162163
std.debug.print("Done converting!\n", .{});
163164
}
164165

165-
zgui.setNextItemWidth(@max(zgui.calcTextSize(settings.game_executable_path, .{})[0], min_width));
166+
zgui.setNextItemWidth(@max(zgui.calcTextSize(settings.game_executable_path, .{})[0] + padding, min_width));
166167
if (zgui.inputTextWithHint("Game .exe path", .{ .hint = "Copy-paste a path from File Explorer here", .buf = &game_executable_path_mut })) {
167168
settings.game_executable_path = std.mem.span(@as([*:0]u8, &game_executable_path_mut));
168169
try writeSettings(settings);

0 commit comments

Comments
 (0)