Skip to content
Snippets Groups Projects
Commit 7813cfb2 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Some more fixins.

parent 1dc1fd4f
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -595,6 +595,9 @@ do_layout_set_size_recurse(NewIfcObj obj)
else {
if (obj->parent && obj->parent->child_width < obj->width)
return NewIfc_error_wont_fit;
ret = NI_set_layout_width(obj, obj->width);
if (ret != NewIfc_error_none)
return ret;
}
if (obj->height == NI_SHRINK) {
......@@ -614,6 +617,9 @@ do_layout_set_size_recurse(NewIfcObj obj)
else {
if (obj->parent && obj->parent->child_height < obj->height)
return NewIfc_error_wont_fit;
ret = NI_set_layout_height(obj, obj->height);
if (ret != NewIfc_error_none)
return ret;
}
// Then, recurse peers
......
......@@ -135,7 +135,6 @@ void test_api(CuTest *ct)
CuAssertTrue(ct, robj->do_render(robj, NULL) == NewIfc_error_none);
size_t sz = strlen(new_title);
#if 0
for (size_t i = 0; i < sz; i++) {
ciolib_vmem_gettext(i+36,1,i+36,1,&cells);
CuAssertTrue(ct, cells.ch == new_title[i]);
......@@ -143,8 +142,6 @@ void test_api(CuTest *ct)
CuAssertTrue(ct, cells.bg == obj->bg_colour);
CuAssertTrue(ct, cells.font == obj->font);
}
#endif
sleep(2);
CuAssertTrue(ct, NI_destroy(robj) == NewIfc_error_none);
}
......
......@@ -186,7 +186,7 @@ rw_do_render_recurse(NewIfcObj obj, struct NewIfc_render_context *ctx)
}
if (obj->right_pad) {
for (size_t x = 0; x < obj->right_pad; x++) {
set_vmem_cell(ctx, x + obj->width - obj->right_pad, y, obj->fg_colour, obj->bg_colour, ' ', obj->font);
set_vmem_cell(ctx, x + obj->layout_size.width - obj->right_pad, y, obj->fg_colour, obj->bg_colour, ' ', obj->font);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment