@@ -48,7 +48,7 @@ class HeaderLabel(Label):
48
48
49
49
header = ['ID' , 'Nome' , 'Preco' , 'IVA' ]
50
50
col_size = [0.1 , 0.5 , 0.2 , 0.2 ]
51
- body_alignment = ["left " , "left" , "right" , "right" ]
51
+ body_alignment = ["center " , "left" , "right" , "right" ]
52
52
53
53
products_list = []
54
54
@@ -84,22 +84,21 @@ def __init__(self, header_data, body_data, b_align, cols_size, **kwargs):
84
84
for item in bcell :
85
85
86
86
cell = CLabel (text = ('[color=1b799c]' + item + '[/color]' ),
87
- background_color = (0 ,0 ,0 ,0 ),
88
- halign = b_align [n ],
87
+ _background_color = (0 ,0 ,0 ,0 ),
88
+ background_normal = "background_normal.png" ,
89
+ background_down = "background_pressed.png" ,
90
+ halign = b_align [n ],
89
91
markup = True ,
90
92
text_size = (300 , None ),
91
93
size_hint_x = cols_size [n ],
92
94
id = ("row_" + str (counter ) + "_col_" + str (n )))
93
95
94
- tmp = Window .size [0 ] * cell .size_hint_x
95
- print tmp
96
- #cell.halign="right"
97
- cell .text_size = (tmp , None )
98
- #cell.bind(text_size=(tmp, None), halign="right")
99
- print cell .id
100
- print cell .size_hint_x
101
- print Window .size [0 ]
102
- print (Window .size [0 ] * cell .size_hint_x )
96
+ cell_width = Window .size [0 ] * cell .size_hint_x
97
+ cell .text_size = (cell_width - 30 , None )
98
+ # print cell.id
99
+ # print cell.size_hint_x
100
+ # print Window.size[0]
101
+ # print (Window.size[0] * cell.size_hint_x)
103
102
# def on_pressed_cell(self):
104
103
# self.row_10_col_1.bind(state = "Down")
105
104
# print self
0 commit comments