Set the DPI on activity startup. In the future we should have a xsetting for this.

master
Tomeu Vizoso 18 years ago
parent 5104e24ffa
commit 07b8cad5b9

@ -21,6 +21,7 @@ import os
import gtk
import hippo
import _sugar
from sugar.presence import PresenceService
from sugar.activity.activityservice import ActivityService
from sugar.graphics.window import Window
@ -31,6 +32,11 @@ class Activity(Window, gtk.Container):
def __init__(self, handle):
Window.__init__(self)
# FIXME: This will work only for activities in python. We need a xsetting.
display = gtk.gdk.display_manager_get().get_default_display()
screen = display.get_default_screen()
screen.set_resolution(_sugar.get_screen_dpi())
self.connect('destroy', self._destroy_cb)
self._shared = False

Loading…
Cancel
Save