diff --git a/examples/anim/lv_example_anim_3.py b/examples/anim/lv_example_anim_3.py index 8e687d8aa5..8822e0d1cb 100644 --- a/examples/anim/lv_example_anim_3.py +++ b/examples/anim/lv_example_anim_3.py @@ -7,8 +7,6 @@ from micropython import const # CHART_POINTS_NUM = const(256) -def LV_GRID_FR(x): - return lv.COORD.MAX -100 +x class LvExampleAnim_3(): # @@ -16,8 +14,8 @@ class LvExampleAnim_3(): # def __init__(self): # Create a container with grid - col_dsc = [LV_GRID_FR(1), 200, LV_GRID_FR(1), lv.GRID_TEMPLATE.LAST] - row_dsc = [30, 10, 10, LV_GRID_FR(1),lv.GRID_TEMPLATE.LAST] + col_dsc = [lv.grid_fr(1), 200, lv.grid_fr(1), lv.GRID_TEMPLATE.LAST] + row_dsc = [30, 10, 10, lv.grid_fr(1),lv.GRID_TEMPLATE.LAST] self.p1 = 0 self.p2 = 0 diff --git a/examples/layouts/grid/lv_example_grid_1.py b/examples/layouts/grid/lv_example_grid_1.py index 814b076fd5..433ffc6761 100644 --- a/examples/layouts/grid/lv_example_grid_1.py +++ b/examples/layouts/grid/lv_example_grid_1.py @@ -2,8 +2,8 @@ # A simple grid # -col_dsc = [70, 70, 70, lv.COORD.MAX] -row_dsc = [50, 50, 50, lv.COORD.MAX] +col_dsc = [70, 70, 70, lv.GRID_TEMPLATE.LAST] +row_dsc = [50, 50, 50, lv.GRID_TEMPLATE.LAST] # Create a container with grid cont = lv.obj(lv.scr_act()) diff --git a/examples/layouts/grid/lv_example_grid_3.py b/examples/layouts/grid/lv_example_grid_3.py index 873129995e..e820bdacce 100644 --- a/examples/layouts/grid/lv_example_grid_3.py +++ b/examples/layouts/grid/lv_example_grid_3.py @@ -1,5 +1,3 @@ -def LV_GRID_FR(x): - return lv.COORD.MAX - 100 + x # # Demonstrate grid's "free unit" # @@ -8,13 +6,13 @@ def LV_GRID_FR(x): # Column 2: 1 unit from the remaining free space # Column 3: 2 unit from the remaining free space -col_dsc = [60, LV_GRID_FR(1), LV_GRID_FR(2), lv.COORD.MAX] +col_dsc = [60, lv.grid_fr(1), lv.grid_fr(2), lv.GRID_TEMPLATE.LAST] # Row 1: fix width 60 px # Row 2: 1 unit from the remaining free space # Row 3: fix width 60 px -row_dsc = [40, LV_GRID_FR(1), 40, lv.COORD.MAX] +row_dsc = [40, lv.grid_fr(1), 40, lv.GRID_TEMPLATE.LAST] # Create a container with grid cont = lv.obj(lv.scr_act())