Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ resources/nanogui-entypo

compile_commands.json
.clangd
.cache
4 changes: 2 additions & 2 deletions src/canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ void Canvas::draw(NVGcontext *ctx) {

float pixel_ratio = scr->pixel_ratio();

Widget::draw(ctx);

scr->nvg_flush();

Vector2i fbsize = m_size;
Expand Down Expand Up @@ -186,6 +184,8 @@ void Canvas::draw(NVGcontext *ctx) {
#endif
rp->blit_to(Vector2i(0, 0), fbsize, scr, offset);
}

Widget::draw(ctx);
}

NAMESPACE_END(nanogui)
3 changes: 3 additions & 0 deletions src/example1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ class ExampleApplication : public Screen {
}
);

// Create an overlay label for the image view
new Label(image_view, "This is an overlay");

new Label(window, "File dialog", "sans-bold");
tools = new Widget(window);
tools->set_layout(new BoxLayout(Orientation::Horizontal,
Expand Down