Skip to content

Commit

Permalink
explorer: sidebar: framebuffer size -> window size
Browse files Browse the repository at this point in the history
  • Loading branch information
foxnne committed Dec 13, 2024
1 parent 83a5f6b commit afb6880
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
26 changes: 7 additions & 19 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
{
"label": "Build and Run Project (dawn)",
"label": "Build and Run Project",
"type": "shell",
"command": "zig build run",
"group": {
Expand All @@ -38,21 +38,9 @@
}
},
{
"label": "Build and Run Project (sysgpu)",
"label": "Build and Run Project (release-fast)",
"type": "shell",
"command": "zig build run",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"clear": true
}
},
{
"label": "Build and Run Project (sysgpu/release-fast)",
"type": "shell",
"command": "zig build run -Doptimize=ReleaseFast -Duse_sysgpu=true",
"command": "zig build run -Doptimize=ReleaseFast",
"group": {
"kind": "build",
"isDefault": true
Expand All @@ -62,9 +50,9 @@
}
},
{
"label": "Build and Run Project (sysgpu/release-small)",
"label": "Build and Run Project (release-small)",
"type": "shell",
"command": "zig build run -Doptimize=ReleaseSmall -Duse_sysgpu=true",
"command": "zig build run -Doptimize=ReleaseSmall",
"group": {
"kind": "build",
"isDefault": true
Expand All @@ -74,9 +62,9 @@
}
},
{
"label": "Build and Run Project (sysgpu/release-safe)",
"label": "Build and Run Project (release-safe)",
"type": "shell",
"command": "zig build run -Doptimize=ReleaseSafe -Duse_sysgpu=true",
"command": "zig build run -Doptimize=ReleaseSafe",
"group": {
"kind": "build",
"isDefault": true
Expand Down
2 changes: 1 addition & 1 deletion src/editor/explorer/explorer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn draw(core: *Core) void {
}, imgui.Cond_Always);
imgui.setNextWindowSize(.{
.x = explorer_width * pixi.content_scale[0],
.y = pixi.framebuffer_size[1],
.y = pixi.window_size[1],
}, imgui.Cond_None);

var explorer_flags: imgui.WindowFlags = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/editor/sidebar/sidebar.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn draw() void {
}, imgui.Cond_Always);
imgui.setNextWindowSize(.{
.x = pixi.state.settings.sidebar_width * pixi.content_scale[0],
.y = pixi.framebuffer_size[1],
.y = pixi.window_size[1],
}, imgui.Cond_None);
imgui.pushStyleVarImVec2(imgui.StyleVar_SelectableTextAlign, .{ .x = 0.5, .y = 0.5 });
imgui.pushStyleColorImVec4(imgui.Col_Header, pixi.state.theme.foreground.toImguiVec4());
Expand Down

0 comments on commit afb6880

Please sign in to comment.