@@ -21264,15 +21264,12 @@ nk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel
2126421264 float panel_space;
2126521265
2126621266 struct nk_vec2 spacing;
21267- struct nk_vec2 padding;
2126821267
2126921268 spacing = style->window.spacing;
21270- padding = nk_panel_get_padding(style, type);
2127121269
2127221270 /* calculate the usable panel space */
21273- panel_padding = 2 * padding.x;
2127421271 panel_spacing = (float)NK_MAX(columns - 1, 0) * spacing.x;
21275- panel_space = total_space - panel_padding - panel_spacing;
21272+ panel_space = total_space - panel_spacing;
2127621273 return panel_space;
2127721274}
2127821275NK_LIB void
@@ -21816,7 +21813,6 @@ nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx,
2181621813 NK_ASSERT(bounds);
2181721814
2181821815 spacing = style->window.spacing;
21819- padding = nk_panel_get_padding(style, layout->type);
2182021816 panel_space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type,
2182121817 layout->bounds.w, layout->row.columns);
2182221818
@@ -21921,7 +21917,7 @@ nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx,
2192121917 bounds->w = item_width;
2192221918 bounds->h = layout->row.height - spacing.y;
2192321919 bounds->y = layout->at_y - (float)*layout->offset_y;
21924- bounds->x = layout->at_x + item_offset + item_spacing + padding.x ;
21920+ bounds->x = layout->at_x + item_offset + item_spacing;
2192521921 if (((bounds->x + bounds->w) > layout->max_x) && modify)
2192621922 layout->max_x = bounds->x + bounds->w;
2192721923 bounds->x -= (float)*layout->offset_x;
@@ -29114,6 +29110,7 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
2911429110/// - [yy]: Minor version with non-breaking API and library changes
2911529111/// - [zz]: Bug fix version with no direct changes to API
2911629112///
29113+ /// - 2020/03/06 (4.01.7) - Fix bug where width padding was applied twice
2911729114/// - 2020/02/06 (4.01.6) - Update stb_truetype.h and stb_rect_pack.h and separate them
2911829115/// - 2019/12/10 (4.01.5) - Fix off-by-one error in NK_INTERSECT
2911929116/// - 2019/10/09 (4.01.4) - Fix bug for autoscrolling in nk_do_edit
0 commit comments