Change emulator resolution to 800x600.

Change canvas resolution to 1200x900, scale it down in the emulator.
This commit is contained in:
Marco Pesenti Gritti 2006-08-16 20:34:33 +02:00
parent 7dddefe229
commit a963c33078
2 changed files with 7 additions and 6 deletions

View File

@ -9,12 +9,12 @@ class Model(goocanvas.CanvasModelSimple):
root = self.get_root_item() root = self.get_root_item()
item = goocanvas.Rect(x=0, y=0, width=693, height=520, item = goocanvas.Rect(x=0, y=0, width=1200, height=900,
fill_color="red") fill_color="red")
root.add_child(item) root.add_child(item)
item = IconItem('buddy') item = IconItem('buddy')
#item.set_color('blue') item.set_color('blue')
root.add_child(item) root.add_child(item)
class HomeWindow(gtk.Window): class HomeWindow(gtk.Window):
@ -27,12 +27,13 @@ class HomeWindow(gtk.Window):
canvas = goocanvas.CanvasView() canvas = goocanvas.CanvasView()
canvas_model = Model() canvas_model = Model()
canvas.set_bounds(0, 0, 693, 520) canvas.set_bounds(0, 0, 1200, 900)
canvas.set_scale(float(800) / float(1200))
canvas.set_size_request(800, 600)
self.add(canvas) self.add(canvas)
canvas.show() canvas.show()
canvas.set_model(canvas_model) canvas.set_model(canvas_model)
canvas.set_size_request(693, 520)
def __realize_cb(self, window): def __realize_cb(self, window):
self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DESKTOP) self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DESKTOP)

View File

@ -30,7 +30,7 @@ def get_display_number():
class XephyrProcess(Process): class XephyrProcess(Process):
def __init__(self): def __init__(self):
self._display = get_display_number() self._display = get_display_number()
cmd = 'Xephyr :%d -ac -screen 640x480' % (self._display) cmd = 'Xephyr :%d -ac -screen 800x600' % (self._display)
Process.__init__(self, cmd) Process.__init__(self, cmd)
def get_name(self): def get_name(self):
@ -43,7 +43,7 @@ class XephyrProcess(Process):
class XnestProcess(Process): class XnestProcess(Process):
def __init__(self): def __init__(self):
self._display = get_display_number() self._display = get_display_number()
cmd = 'Xnest :%d -ac -geometry 693x520' % (self._display) cmd = 'Xnest :%d -ac -geometry 800x600' % (self._display)
Process.__init__(self, cmd) Process.__init__(self, cmd)
def get_name(self): def get_name(self):