tiling fixed

git-svn-id: http://www.neo1973-germany.de/svn@224 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
fgau 2008-12-28 19:41:38 +00:00
parent 5415938d0b
commit 520c7230d4
2 changed files with 15 additions and 6 deletions

View file

@ -171,10 +171,19 @@ collections {
} }
} }
} }
part {
name: "clipper";
type: RECT;
description {
rel1 { relative: 1/2 1/2; offset: -180 -180; }
rel2 { relative: 1/2 1/2; offset: 180 180; }
}
}
part { part {
name: "icon"; name: "icon";
mouse_events: 0;
type: SWALLOW; type: SWALLOW;
mouse_events: 0;
clip_to: "clipper";
description { description {
/*fixed: 1 1;*/ /*fixed: 1 1;*/
rel1 { relative: 1/2 1/2; offset: -180 -180; } rel1 { relative: 1/2 1/2; offset: -180 -180; }

View file

@ -33,21 +33,21 @@ class HonScreen(EdjeGroup):
self.image = self.evas.Image(file=self.pix) self.image = self.evas.Image(file=self.pix)
x, y = self.image.image_size x, y = self.image.image_size
dx, dy = self.part_size_get('icon') dx, dy = self.part_size_get('icon')
# self.image.geometry = 0, 0 , 100, 100
# self.image.show()
if x * dy > y * dx: if x * dy > y * dx:
y = y * dx / x y = y * dx / x
x = dx x = dx
else: else:
x = x * dy / y x = x * dy / y
y = dy y = dy
print 'x,y: ', x, y, dx, dy print 'x, y, dx, dy: ', x, y, dx, dy
# self.obj.show()
self.image.fill = 0, 0, x, y self.image.fill = 0, 0, x, y
self.part_swallow('icon', self.image) self.part_swallow('icon', self.image)
self.obj = self.part_object_get('clipper')
self.obj.size = x, y
self.obj.show()
print 'obj: ', self.obj
def delete(self): def delete(self):
self.image.hide()
EdjeGroup.hide(self) EdjeGroup.hide(self)
@edje.decorators.signal_callback("mouse,up,1", "*") @edje.decorators.signal_callback("mouse,up,1", "*")