fixed plus button bug, reduced raster size

git-svn-id: http://www.neo1973-germany.de/svn@14 46df4e5c-bc4e-4628-a0fc-830ba316316d
main
josch 17 years ago
parent fe715867ef
commit d48b1e4f98

@ -69,14 +69,14 @@ collections {
offset: 0 0; offset: 0 0;
} }
rel2 { rel2 {
relative: 1.0 0.05; relative: 1.0 0.1;
offset: -1 -1; offset: -1 -1;
} }
text { text {
font: "Sans"; font: "Sans";
size: 1; size: 1;
fit: 1 1; fit: 1 1;
align: 0.5 0.5; align: 0.5 0.0;
} }
} }
} }

@ -150,7 +150,7 @@ class TestView(edje.Edje):
def init_redraw(self): def init_redraw(self):
self.animate = True self.animate = True
#calculate size of tile raster - reload if it differs from before eg. when size changes #calculate size of tile raster - reload if it differs from before eg. when size changes
self.border = int((self.size[0]+self.size[1])/512)+1 self.border = int((self.size[0]+self.size[1])/512)
if len(self.icons) != (2*self.border+1)**2: if len(self.icons) != (2*self.border+1)**2:
print "use", self.border print "use", self.border
#clean up #clean up
@ -185,13 +185,11 @@ class TestView(edje.Edje):
#if all tiles are downloaded #if all tiles are downloaded
for i in xrange(2*self.border+1): for i in xrange(2*self.border+1):
for j in xrange(2*self.border+1): for j in xrange(2*self.border+1):
#if some errors occurd replace with placeholder #if some errors occur replace with placeholder
#if not os.path.exists("%d/%d/%d.png"%(self.z,self.x+i-self.border,self.y+j-self.border)):
try: try:
self.icons[(2*self.border+1)*i+j].file_set("%d/%d/%d.png"%(self.z,self.x+i-self.border,self.y+j-self.border)) self.icons[(2*self.border+1)*i+j].file_set("%d/%d/%d.png"%(self.z,self.x+i-self.border,self.y+j-self.border))
except: except:
self.icons[(2*self.border+1)*i+j].file_set("404.png") self.icons[(2*self.border+1)*i+j].file_set("404.png")
self.icons[(2*self.border+1)*i+j].set_position((i-self.border)*256+self.size[0]/2-self.offset_x,(j-self.border)*256+self.size[1]/2-self.offset_y) self.icons[(2*self.border+1)*i+j].set_position((i-self.border)*256+self.size[0]/2-self.offset_x,(j-self.border)*256+self.size[1]/2-self.offset_y)
self.icons[(2*self.border+1)*i+j].size = 256,256 self.icons[(2*self.border+1)*i+j].size = 256,256
self.icons[(2*self.border+1)*i+j].fill = 0, 0, 256, 256 self.icons[(2*self.border+1)*i+j].fill = 0, 0, 256, 256
@ -260,7 +258,7 @@ class TestView(edje.Edje):
if not self.animate: if not self.animate:
if source in "plus": if source in "plus":
ecore.timer_add(0.05, self.animate_zoom_in) ecore.timer_add(0.05, self.animate_zoom_in)
if source in "minus": elif source in "minus":
ecore.timer_add(0.05, self.animate_zoom_out) ecore.timer_add(0.05, self.animate_zoom_out)
else: else:
self.x_pos, self.y_pos = self.evas_canvas.evas_obj.evas.pointer_canvas_xy self.x_pos, self.y_pos = self.evas_canvas.evas_obj.evas.pointer_canvas_xy

Loading…
Cancel
Save