clearer resize code
This commit is contained in:
parent
5213823f44
commit
3948bd6f50
3 changed files with 65 additions and 69 deletions
18
test/main.c
18
test/main.c
|
|
@ -191,30 +191,30 @@ int main(void)
|
|||
// ug_container_remove(ctx, "Menu fichissimo");
|
||||
//}
|
||||
|
||||
//ug_container_floating(ctx, "stupid name", (ug_div_t){.x=SIZE_PX(0), .y=SIZE_PX(0), .w=SIZE_PX(100), .h=SIZE_MM(75.0)});
|
||||
ug_container_floating(ctx, "stupid name", (ug_div_t){.x=SIZE_PX(0), .y=SIZE_PX(0), .w=SIZE_PX(100), .h=SIZE_MM(75.0)});
|
||||
|
||||
//ug_container_floating(ctx, "floating windoooooooow", (ug_div_t){.x=SIZE_PX(100), .y=SIZE_PX(0), .w=SIZE_PX(100), .h=SIZE_MM(75.0)});
|
||||
|
||||
//ug_container_sidebar(ctx, "Right Sidebar", (ug_size_t)SIZE_PX(300), UG_SIDE_RIGHT);
|
||||
//ug_container_sidebar(ctx, "Left Sidebar", (ug_size_t)SIZE_PX(200), UG_SIDE_LEFT);
|
||||
//ug_container_sidebar(ctx, "Bottom Sidebar", (ug_size_t)SIZE_MM(10), UG_SIDE_BOTTOM);
|
||||
ug_container_sidebar(ctx, "Top Sidebar", (ug_size_t)SIZE_MM(40), UG_SIDE_TOP);
|
||||
//ug_container_sidebar(ctx, "Top Sidebar", (ug_size_t)SIZE_MM(40), UG_SIDE_TOP);
|
||||
|
||||
// ug_container_popup(ctx, "Annoying popup", (ug_div_t){.x=SIZE_MM(150), .y=SIZE_MM(150), .w=SIZE_PX(100), .h=SIZE_MM(75.0)});
|
||||
|
||||
//ug_container_body(ctx, "Main Body");
|
||||
ug_container_body(ctx, "Main Body");
|
||||
//if (ug_container_body(ctx, "Other Body"))
|
||||
// printf("No space!\n");
|
||||
|
||||
ug_layout_row(ctx);
|
||||
|
||||
ug_element_button(ctx, "button 1", "", (ug_div_t){.w=SIZE_PX(10),.h=SIZE_PX(10)});
|
||||
ug_element_button(ctx, "button 2", "", (ug_div_t){.w=SIZE_PX(10),.h=SIZE_PX(10)});
|
||||
//ug_element_button(ctx, "button 3", "", (ug_div_t){.w=SIZE_PX(10),.h=SIZE_PX(10)});
|
||||
ug_element_button(ctx, "button 1", "", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_element_button(ctx, "button 2", "", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
//ug_element_button(ctx, "button 3", "", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_layout_column(ctx);
|
||||
ug_element_button(ctx, "button 4", "", (ug_div_t){.w=SIZE_PX(10),.h=SIZE_PX(10)});
|
||||
ug_element_button(ctx, "button 5", "", (ug_div_t){.w=SIZE_PX(10),.h=SIZE_PX(10)});
|
||||
//ug_element_button(ctx, "button 6", "", (ug_div_t){.w=SIZE_PX(10),.h=SIZE_PX(10),.x=SIZE_PX(-10)});
|
||||
ug_element_button(ctx, "button 4", "", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
ug_element_button(ctx, "button 5", "", (ug_div_t){SQUARE(SIZE_MM(10))});
|
||||
//ug_element_button(ctx, "button 6", "", (ug_div_t){SQUARE(SIZE_MM(10)),.x=SIZE_PX(-10)});
|
||||
|
||||
ug_frame_end(ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue