Skip to content

Commit

Permalink
tools: Make palette combo full width
Browse files Browse the repository at this point in the history
  • Loading branch information
foxnne committed Dec 6, 2023
1 parent c85a90f commit 25da09c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/editor/explorer/tools.zig
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn draw() void {
pixi.state.colors.height = @as(u8, @intCast(std.math.clamp(height, 0, 255)));
}
} else {
var primary: [4]f32 = if (pixi.state.tools.current == .heightmap) .{255,255,255,255} else .{
var primary: [4]f32 = if (pixi.state.tools.current == .heightmap) .{ 255, 255, 255, 255 } else .{
@as(f32, @floatFromInt(pixi.state.colors.primary[0])) / 255.0,
@as(f32, @floatFromInt(pixi.state.colors.primary[1])) / 255.0,
@as(f32, @floatFromInt(pixi.state.colors.primary[2])) / 255.0,
Expand Down Expand Up @@ -122,7 +122,8 @@ pub fn draw() void {
zgui.text("Palette", .{});
zgui.separator();

if (zgui.beginCombo("Palette", .{ .preview_value = if (pixi.state.colors.palette) |palette| palette.name else "none", .flags = .{ .height_largest = true } })) {
zgui.setNextItemWidth(-1.0);
if (zgui.beginCombo("##PaletteCombo", .{ .preview_value = if (pixi.state.colors.palette) |palette| palette.name else "none", .flags = .{ .height_largest = true } })) {
defer zgui.endCombo();
searchPalettes() catch unreachable;
}
Expand Down

0 comments on commit 25da09c

Please sign in to comment.