History

Comments and formatting

rxi committed 8 years ago

Commit de3249b1 parent a989b811 file · +3 −7Browse files

Unified · Split

src/microui.c+3−7
@@ -295,9 +295,7 @@ static void push_layout(mu_Context *ctx, mu_Rect body, mu_Vec2 scroll) { · 294 unmodified lines
295295 mu_Layout layout;
296296 int width = 0;
297297 memset(&layout, 0, sizeof(mu_Layout));
298− layout.body = body;
299− layout.body.x -= scroll.x;
300− layout.body.y -= scroll.y;
298+ layout.body = mu_rect(body.x - scroll.x, body.y - scroll.y, body.w, body.h);
301299 layout.max = mu_vec2(-0x1000000, -0x1000000);
302300 push(ctx->layout_stack, layout);
303301 mu_layout_row(ctx, 1, &width, 0);
@@ -1046,7 +1044,7 @@ static void begin_root_container(mu_Context *ctx, mu_Container *cnt) { · 742 unmodified lines
10461044 {
10471045 ctx->hover_root = cnt;
10481046 }
1049− /* clipping is set directly here in case a root-container is made within
1047+ /* clipping is reset here in case a root-container is made within
10501048 ** another root-containers's begin/end block; this prevents the inner
10511049 ** root-container being clipped to the outer */
10521050 push(ctx->clip_stack, unclipped_rect);
@@ -1143,9 +1141,7 @@ int mu_begin_window_ex(mu_Context *ctx, mu_Container *cnt, const char *title, · 90 unmodified lines
11431141 }
11441142
11451143 /* close if this is a popup window and elsewhere was clicked */
1146− if ((opt & MU_OPT_POPUP) && ctx->mouse_pressed &&
1147− ctx->last_hover_root != cnt)
1148− {
1144+ if (opt & MU_OPT_POPUP && ctx->mouse_pressed && ctx->last_hover_root != cnt) {
11491145 cnt->open = 0;
11501146 }
11511147

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t