Merge pull request #90 from Hejsil/fix-tree-pop-layout-restore

Fix #85 (layout was restored incorrectly on tree pop)
This commit is contained in:
dumblob 2020-03-23 11:59:38 +01:00 committed by GitHub
commit e08d7b418f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View File

@ -22139,7 +22139,7 @@ nk_tree_state_pop(struct nk_context *ctx)
win = ctx->current;
layout = win->layout;
layout->at_x -= ctx->style.tab.indent + ctx->style.window.padding.x;
layout->at_x -= ctx->style.tab.indent + (float)*layout->offset_x;
layout->bounds.w += ctx->style.tab.indent + ctx->style.window.padding.x;
NK_ASSERT(layout->row.tree_depth);
layout->row.tree_depth--;
@ -29094,6 +29094,8 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
/// - [yy]: Minor version with non-breaking API and library changes
/// - [zz]: Bug fix version with no direct changes to API
///
/// - 2020/03/22 (4.01.9) - Fix bug where layout state wasn't restored correctly after
/// popping a tree.
/// - 2020/03/11 (4.01.8) - Fix bug where padding is subtracted from widget
/// - 2020/03/06 (4.01.7) - Fix bug where width padding was applied twice
/// - 2020/02/06 (4.01.6) - Update stb_truetype.h and stb_rect_pack.h and separate them

View File

@ -1,6 +1,6 @@
{
"name": "nuklear",
"version": "4.01.8",
"version": "4.01.9",
"repo": "Immediate-Mode-UI/Nuklear",
"description": "A small ANSI C gui toolkit",
"keywords": ["gl", "ui", "toolkit"],

View File

@ -8,6 +8,8 @@
/// - [yy]: Minor version with non-breaking API and library changes
/// - [zz]: Bug fix version with no direct changes to API
///
/// - 2020/03/22 (4.01.9) - Fix bug where layout state wasn't restored correctly after
/// popping a tree.
/// - 2020/03/11 (4.01.8) - Fix bug where padding is subtracted from widget
/// - 2020/03/06 (4.01.7) - Fix bug where width padding was applied twice
/// - 2020/02/06 (4.01.6) - Update stb_truetype.h and stb_rect_pack.h and separate them

View File

@ -162,7 +162,7 @@ nk_tree_state_pop(struct nk_context *ctx)
win = ctx->current;
layout = win->layout;
layout->at_x -= ctx->style.tab.indent + ctx->style.window.padding.x;
layout->at_x -= ctx->style.tab.indent + (float)*layout->offset_x;
layout->bounds.w += ctx->style.tab.indent + ctx->style.window.padding.x;
NK_ASSERT(layout->row.tree_depth);
layout->row.tree_depth--;