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

Some more fixins.

parent 57283c51
No related branches found
No related tags found
No related merge requests found
Pipeline #5798 passed
...@@ -595,6 +595,9 @@ do_layout_set_size_recurse(NewIfcObj obj) ...@@ -595,6 +595,9 @@ do_layout_set_size_recurse(NewIfcObj obj)
else { else {
if (obj->parent && obj->parent->child_width < obj->width) if (obj->parent && obj->parent->child_width < obj->width)
return NewIfc_error_wont_fit; 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) { if (obj->height == NI_SHRINK) {
...@@ -614,6 +617,9 @@ do_layout_set_size_recurse(NewIfcObj obj) ...@@ -614,6 +617,9 @@ do_layout_set_size_recurse(NewIfcObj obj)
else { else {
if (obj->parent && obj->parent->child_height < obj->height) if (obj->parent && obj->parent->child_height < obj->height)
return NewIfc_error_wont_fit; return NewIfc_error_wont_fit;
ret = NI_set_layout_height(obj, obj->height);
if (ret != NewIfc_error_none)
return ret;
} }
// Then, recurse peers // Then, recurse peers
......
...@@ -135,7 +135,6 @@ void test_api(CuTest *ct) ...@@ -135,7 +135,6 @@ void test_api(CuTest *ct)
CuAssertTrue(ct, robj->do_render(robj, NULL) == NewIfc_error_none); CuAssertTrue(ct, robj->do_render(robj, NULL) == NewIfc_error_none);
size_t sz = strlen(new_title); size_t sz = strlen(new_title);
#if 0
for (size_t i = 0; i < sz; i++) { for (size_t i = 0; i < sz; i++) {
ciolib_vmem_gettext(i+36,1,i+36,1,&cells); ciolib_vmem_gettext(i+36,1,i+36,1,&cells);
CuAssertTrue(ct, cells.ch == new_title[i]); CuAssertTrue(ct, cells.ch == new_title[i]);
...@@ -143,8 +142,6 @@ void test_api(CuTest *ct) ...@@ -143,8 +142,6 @@ void test_api(CuTest *ct)
CuAssertTrue(ct, cells.bg == obj->bg_colour); CuAssertTrue(ct, cells.bg == obj->bg_colour);
CuAssertTrue(ct, cells.font == obj->font); CuAssertTrue(ct, cells.font == obj->font);
} }
#endif
sleep(2);
CuAssertTrue(ct, NI_destroy(robj) == NewIfc_error_none); CuAssertTrue(ct, NI_destroy(robj) == NewIfc_error_none);
} }
......
...@@ -186,7 +186,7 @@ rw_do_render_recurse(NewIfcObj obj, struct NewIfc_render_context *ctx) ...@@ -186,7 +186,7 @@ rw_do_render_recurse(NewIfcObj obj, struct NewIfc_render_context *ctx)
} }
if (obj->right_pad) { if (obj->right_pad) {
for (size_t x = 0; x < obj->right_pad; x++) { 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.
Please register or to comment