summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_table_layout.c
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-03-07 01:40:23 +0000
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 09:59:05 -0800
commit0b7cd8d88ec2192b60c830a5d0d2bd89fd859c84 (patch)
tree3153c391551669dce74576f08ce0c53b1bc47a57 /src/lib/elementary/efl_ui_table_layout.c
parent4a306ec39beeb525ab543acbd60cc28a23ee5aab (diff)
ui.box, ui.table: respect user min
Use restricted_min_set instead of min_set in layout_update. min_set is set by public API(user side). if it is changed by internal function, user will get unexpected value later. please check added test case. Note that this reverts commit e013480e7a0ae11a9363f9a207cf63e3bb7f5423. instead, this patch provides better solution of the issue refered in e013480e7. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D8214
Diffstat (limited to 'src/lib/elementary/efl_ui_table_layout.c')
-rw-r--r--src/lib/elementary/efl_ui_table_layout.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/elementary/efl_ui_table_layout.c b/src/lib/elementary/efl_ui_table_layout.c
index 26c288f..8821fc1 100644
--- a/src/lib/elementary/efl_ui_table_layout.c
+++ b/src/lib/elementary/efl_ui_table_layout.c
@@ -232,7 +232,7 @@ _efl_ui_table_custom_layout(Efl_Ui_Table *ui_table, Efl_Ui_Table_Data *pd)
232 232
233 if (!pd->count) 233 if (!pd->count)
234 { 234 {
235 efl_gfx_hint_size_min_set(ui_table, EINA_SIZE2D(0, 0)); 235 efl_gfx_hint_size_restricted_min_set(ui_table, EINA_SIZE2D(0, 0));
236 return; 236 return;
237 } 237 }
238 238
@@ -369,11 +369,7 @@ _efl_ui_table_custom_layout(Efl_Ui_Table *ui_table, Efl_Ui_Table_Data *pd)
369 + (table_calc.layout_calc[1].pad * 369 + (table_calc.layout_calc[1].pad *
370 table_calc.cell_calc[1][rows - 1].index); 370 table_calc.cell_calc[1][rows - 1].index);
371 371
372 if (table_calc.want[0] < table_calc.layout_calc[0].min) 372 efl_gfx_hint_size_restricted_min_set(ui_table,
373 table_calc.want[0] = table_calc.layout_calc[0].min; 373 EINA_SIZE2D(table_calc.want[0],
374 if (table_calc.want[1] < table_calc.layout_calc[1].min) 374 table_calc.want[1]));
375 table_calc.want[1] = table_calc.layout_calc[1].min;
376
377 efl_gfx_hint_size_min_set(ui_table, EINA_SIZE2D(table_calc.want[0],
378 table_calc.want[1]));
379} 375}