From 1be6475e5b89de6e9ae153475889dfd51b91ce8f Mon Sep 17 00:00:00 2001 From: vurtun Date: Mon, 4 Jan 2016 00:19:38 +0100 Subject: [PATCH] fixed #35 --- demo/demo.c | 8 ++++---- example/demo/demo.c | 18 +++++++++--------- zahnrad.c | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/demo/demo.c b/demo/demo.c index dd3a3e3..0f97532 100644 --- a/demo/demo.c +++ b/demo/demo.c @@ -170,8 +170,8 @@ demo_window(struct zr_layout *layout, struct zr_context *ctx, enum theme *theme) zr_label(ctx, "By Micha Mettke", ZR_TEXT_LEFT); zr_label(ctx, "Zahnrad is licensed under the MIT License.", ZR_TEXT_LEFT); zr_label(ctx, "See LICENSE for more information", ZR_TEXT_LEFT); + zr_popup_end(ctx); } else show_app_about = zr_false; - zr_popup_end(ctx); } if (show_close_popup) @@ -191,8 +191,8 @@ demo_window(struct zr_layout *layout, struct zr_context *ctx, enum theme *theme) show_close_popup = zr_false; zr_popup_close(ctx); } + zr_popup_end(ctx); } else show_close_popup = zr_false; - zr_popup_end(ctx); } if (show_color_picker_popup) @@ -224,8 +224,8 @@ demo_window(struct zr_layout *layout, struct zr_context *ctx, enum theme *theme) zr_popup_close(ctx); show_color_picker_popup = zr_false; } + zr_popup_end(ctx); } else show_color_picker_popup = zr_false; - zr_popup_end(ctx); } /* contextual menu */ @@ -590,7 +590,7 @@ demo_window(struct zr_layout *layout, struct zr_context *ctx, enum theme *theme) zr_layout_pop(ctx); } - if (zr_layout_push(ctx, ZR_LAYOUT_TAB, "chart")) + if (zr_layout_push(ctx, ZR_LAYOUT_TAB, "Chart")) { float id = 0; static int col_index = -1; diff --git a/example/demo/demo.c b/example/demo/demo.c index bfb18ad..92db3a4 100644 --- a/example/demo/demo.c +++ b/example/demo/demo.c @@ -375,17 +375,17 @@ basic_demo(struct zr_context *ctx, struct icons *img) *------------------------------------------------*/ if (image_active) { struct zr_layout popup; - zr_popup_begin(ctx, &popup, ZR_POPUP_STATIC, "Image Popup", 0, - zr_rect(265, 0, 320, 220)); - zr_layout_row_static(ctx, 82, 82, 3); - for (i = 0; i < 9; ++i) { - if (zr_button_image(ctx, zr_image_id(img->images[i]), ZR_BUTTON_DEFAULT)) { - selected_image = i; - image_active = 0; - zr_popup_close(ctx); + if (zr_popup_begin(ctx, &popup, ZR_POPUP_STATIC, "Image Popup", 0, zr_rect(265, 0, 320, 220))) { + zr_layout_row_static(ctx, 82, 82, 3); + for (i = 0; i < 9; ++i) { + if (zr_button_image(ctx, zr_image_id(img->images[i]), ZR_BUTTON_DEFAULT)) { + selected_image = i; + image_active = 0; + zr_popup_close(ctx); + } } + zr_popup_end(ctx); } - zr_popup_end(ctx); } /*------------------------------------------------ * COMBOBOX diff --git a/zahnrad.c b/zahnrad.c index 599a44f..536b2c2 100644 --- a/zahnrad.c +++ b/zahnrad.c @@ -9790,8 +9790,8 @@ zr_tooltip(struct zr_context *ctx, const char *text) if (zr_tooltip_begin(ctx, &layout, (float)text_width)) { zr_layout_row_dynamic(ctx, (float)text_height, 1); zr_text(ctx, text, text_len, ZR_TEXT_LEFT); + zr_tooltip_end(ctx); } - zr_tooltip_end(ctx); } /*