示例#1
0
def animate_in(anim=True):
    """Fade in all the map actors."""
    for i in range(Gst.get_int('animation-steps') if anim else 1, 0, -1):
        for actor in (Crosshair, Box, Scale):
            actor.set_opacity(256 - i)
        Widgets.redraw_interface()
        sleep(0.01)
示例#2
0
def animate_in(anim=True):
    """Fade in all the map actors."""
    for i in range(Gst.get_int('animation-steps') if anim else 1, 0, -1):
        for actor in (Crosshair, Box, Scale):
            actor.set_opacity(256 - i)
        Widgets.redraw_interface()
        sleep(0.01)
示例#3
0
 def search_completed(self, entry, model, itr):
     """Go to the selected location."""
     self.last_search = itr.copy()
     MapView.emit('realize')
     MapView.set_zoom_level(MapView.get_max_zoom_level())
     Widgets.redraw_interface()
     MapView.center_on(*model.get(itr, LATITUDE, LONGITUDE))
     MapView.set_zoom_level(11)
示例#4
0
 def offset_handler(self, *ignore):
     """When the offset is changed, update the loaded photos."""
     for i, photo in enumerate(self.photos):
         if not i % 10:
             Widgets.redraw_interface()
         photo.calculate_timestamp(self.offset)
示例#5
0
 def offset_handler(self, *ignore):
     """When the offset is changed, update the loaded photos."""
     for i, photo in enumerate(self.photos):
         if not i % 10:
             Widgets.redraw_interface()
         photo.calculate_timestamp(self.offset)