Set the DPI on activity startup. In the future we should have a xsetting for this.
This commit is contained in:
parent
5104e24ffa
commit
07b8cad5b9
@ -21,6 +21,7 @@ import os
|
|||||||
import gtk
|
import gtk
|
||||||
import hippo
|
import hippo
|
||||||
|
|
||||||
|
import _sugar
|
||||||
from sugar.presence import PresenceService
|
from sugar.presence import PresenceService
|
||||||
from sugar.activity.activityservice import ActivityService
|
from sugar.activity.activityservice import ActivityService
|
||||||
from sugar.graphics.window import Window
|
from sugar.graphics.window import Window
|
||||||
@ -31,6 +32,11 @@ class Activity(Window, gtk.Container):
|
|||||||
def __init__(self, handle):
|
def __init__(self, handle):
|
||||||
Window.__init__(self)
|
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.connect('destroy', self._destroy_cb)
|
||||||
|
|
||||||
self._shared = False
|
self._shared = False
|
||||||
|
Loading…
Reference in New Issue
Block a user