From a963c330780da5053c5030bde17138ed2a28d0cb Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 16 Aug 2006 20:34:33 +0200 Subject: [PATCH] Change emulator resolution to 800x600. Change canvas resolution to 1200x900, scale it down in the emulator. --- shell/HomeWindow.py | 9 +++++---- shell/session/Emulator.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/shell/HomeWindow.py b/shell/HomeWindow.py index 1609fe78..014ea1d6 100644 --- a/shell/HomeWindow.py +++ b/shell/HomeWindow.py @@ -9,12 +9,12 @@ class Model(goocanvas.CanvasModelSimple): 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") root.add_child(item) item = IconItem('buddy') - #item.set_color('blue') + item.set_color('blue') root.add_child(item) class HomeWindow(gtk.Window): @@ -27,12 +27,13 @@ class HomeWindow(gtk.Window): canvas = goocanvas.CanvasView() 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) canvas.show() canvas.set_model(canvas_model) - canvas.set_size_request(693, 520) def __realize_cb(self, window): self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DESKTOP) diff --git a/shell/session/Emulator.py b/shell/session/Emulator.py index 1e7bced3..c18d92e4 100644 --- a/shell/session/Emulator.py +++ b/shell/session/Emulator.py @@ -30,7 +30,7 @@ def get_display_number(): class XephyrProcess(Process): def __init__(self): 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) def get_name(self): @@ -43,7 +43,7 @@ class XephyrProcess(Process): class XnestProcess(Process): def __init__(self): 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) def get_name(self):