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
295 mu_Layout layout;295 mu_Layout layout;
296 int width = 0;296 int width = 0;
297 memset(&layout, 0, sizeof(mu_Layout));297 memset(&layout, 0, sizeof(mu_Layout));
298 layout.body = body;298 layout.body = mu_rect(body.x - scroll.x, body.y - scroll.y, body.w, body.h);
299 layout.body.x -= scroll.x;
300 layout.body.y -= scroll.y;
301 layout.max = mu_vec2(-0x1000000, -0x1000000);299 layout.max = mu_vec2(-0x1000000, -0x1000000);
302 push(ctx->layout_stack, layout);300 push(ctx->layout_stack, layout);
303 mu_layout_row(ctx, 1, &width, 0);301 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
1046 {1044 {
1047 ctx->hover_root = cnt;1045 ctx->hover_root = cnt;
1048 }1046 }
1049 /* clipping is set directly here in case a root-container is made within1047 /* clipping is reset here in case a root-container is made within
1050 ** another root-containers's begin/end block; this prevents the inner1048 ** another root-containers's begin/end block; this prevents the inner
1051 ** root-container being clipped to the outer */1049 ** root-container being clipped to the outer */
1052 push(ctx->clip_stack, unclipped_rect);1050 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
1143 }1141 }
1144 1142
1145 /* close if this is a popup window and elsewhere was clicked */1143 /* close if this is a popup window and elsewhere was clicked */
1146 if ((opt & MU_OPT_POPUP) && ctx->mouse_pressed &&1144 if (opt & MU_OPT_POPUP && ctx->mouse_pressed && ctx->last_hover_root != cnt) {
1147 ctx->last_hover_root != cnt)
1148 {
1149 cnt->open = 0;1145 cnt->open = 0;
1150 }1146 }
1151 1147

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