fixed window border clipping rect

This commit is contained in:
vurtun 2015-11-08 11:02:18 +01:00
parent 3c9c43d7e2
commit b9cfc77fc7
2 changed files with 7 additions and 4 deletions

View File

@ -300,7 +300,7 @@ show_test_window(struct zr_window *window, struct zr_style *config, enum theme *
/* about popup */
struct zr_context popup;
static struct zr_vec2 about_scrollbar;
static struct zr_rect s = {20, 100, 300, 160};
static struct zr_rect s = {20, 100, 300, 190};
zr_popup_begin(&layout, &popup, ZR_POPUP_STATIC, 0, s, about_scrollbar);
if (zr_header(&popup, "About", ZR_CLOSEABLE, ZR_CLOSEABLE, ZR_HEADER_LEFT)){
show_app_about = zr_false;

View File

@ -5641,12 +5641,15 @@ zr_end(struct zr_context *layout, struct zr_window *window)
out = layout->buffer;
in = (layout->flags & ZR_WINDOW_ROM) ? 0 :layout->input;
if (!(layout->flags & ZR_WINDOW_TAB)) {
#if 0
struct zr_rect clip;
clip.x = MAX(0, (layout->bounds.x - 1));
clip.y = MAX(0, (layout->bounds.y - 1));
clip.x = layout->bounds.x - 1;
clip.y = layout->bounds.y - 1;
clip.w = layout->bounds.w + 1;
clip.h = layout->bounds.h + 1;
zr_command_buffer_push_scissor(out, clip);
#endif
zr_command_buffer_push_scissor(out, zr_null_rect);
}
/* cache configuration data */
@ -5797,7 +5800,7 @@ zr_end(struct zr_context *layout, struct zr_window *window)
window->bounds.x + width, padding_y, config->colors[ZR_COLOR_BORDER]);
}
zr_command_buffer_push_scissor(out, zr_rect(0, 0, zr_null_rect.w, zr_null_rect.h));
/*zr_command_buffer_push_scissor(out, zr_rect(0, 0, zr_null_rect.w, zr_null_rect.h));*/
if (!(window->flags & ZR_WINDOW_TAB)) {
/* window is hidden so clear command buffer */
if (layout->flags & ZR_WINDOW_HIDDEN)