ui: Update for API grid->table
This commit is contained in:
parent
def8a4e578
commit
5ddb82e0da
|
@ -27,30 +27,30 @@ _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
|
|||
efl_exit(0);
|
||||
}
|
||||
|
||||
// Load a simple grid layout into the window
|
||||
static Efl_Ui_Grid *
|
||||
_ui_grid_setup(Efl_Ui_Win *win)
|
||||
// Load a simple table layout into the window
|
||||
static Efl_Ui_Table *
|
||||
_ui_table_setup(Efl_Ui_Win *win)
|
||||
{
|
||||
Efl_Ui_Grid *grid;
|
||||
Efl_Ui_Table *table;
|
||||
int i;
|
||||
|
||||
grid = efl_add(EFL_UI_GRID_CLASS, win);
|
||||
table = efl_add(EFL_UI_TABLE_CLASS, win);
|
||||
|
||||
efl_pack_grid_columns_set(grid, 2);
|
||||
efl_pack_grid_direction_set(grid, EFL_UI_DIR_RIGHT, EFL_UI_DIR_DOWN);
|
||||
efl_pack_table_columns_set(table, 2);
|
||||
efl_pack_table_direction_set(table, EFL_UI_DIR_RIGHT, EFL_UI_DIR_DOWN);
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Long Button"),
|
||||
efl_pack_grid(grid, efl_added, 0, 2, 2, 1));
|
||||
efl_pack_table(table, efl_added, 0, 2, 2, 1));
|
||||
|
||||
for (i = 1; i <= 4; i++)
|
||||
{
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, eina_slstr_printf("Grid %d", i)),
|
||||
efl_pack(grid, efl_added));
|
||||
efl_text_set(efl_added, eina_slstr_printf("Table %d", i)),
|
||||
efl_pack(table, efl_added));
|
||||
}
|
||||
|
||||
return grid;
|
||||
return table;
|
||||
}
|
||||
|
||||
// Load some boxes - a horizontal one for the window layout and a vertical
|
||||
|
@ -92,7 +92,7 @@ _ui_panes_setup(Efl_Ui_Win *win)
|
|||
efl_content_set(efl_part(split, "second"), efl_added),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_ui_panes_split_ratio_set(efl_added, 0.85));
|
||||
efl_content_set(efl_part(horiz_split, "first"), _ui_grid_setup(win));
|
||||
efl_content_set(efl_part(horiz_split, "first"), _ui_table_setup(win));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Quit"),
|
||||
|
|
Loading…
Reference in New Issue