From de9e02b498cf157da0b2af7b135a8fd93a7b57ae Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 17 Aug 2007 14:18:57 +0000 Subject: Fix several sizing bugs. --- diff --git a/shell/view/frame/frame.py b/shell/view/frame/frame.py index f411158..2582fe6 100644 --- a/shell/view/frame/frame.py +++ b/shell/view/frame/frame.py @@ -268,16 +268,16 @@ class Frame(object): screen_w = gtk.gdk.screen_width() self._move_panel(self._top_panel, self._current_position, - 0, - style.GRID_CELL_SIZE, 0, 0) + 0, - self._top_panel.size, 0, 0) self._move_panel(self._bottom_panel, self._current_position, - 0, screen_h, 0, screen_h - style.GRID_CELL_SIZE) + 0, screen_h, 0, screen_h - self._bottom_panel.size) self._move_panel(self._left_panel, self._current_position, - - style.GRID_CELL_SIZE, 0, 0, 0) + - self._left_panel.size, 0, 0, 0) self._move_panel(self._right_panel, self._current_position, - screen_w, 0, screen_w - style.GRID_CELL_SIZE, 0) + screen_w, 0, screen_w - self._right_panel.size, 0) def _hide_completed_cb(self, animator): self.mode = MODE_NONE diff --git a/shell/view/frame/frameinvoker.py b/shell/view/frame/frameinvoker.py index e0f2859..8be0eaf 100644 --- a/shell/view/frame/frameinvoker.py +++ b/shell/view/frame/frameinvoker.py @@ -29,7 +29,7 @@ class FrameCanvasInvoker(CanvasInvoker): return Palette.AROUND def get_screen_area(self): - frame_thickness = style.GRID_CELL_SIZE - style.LINE_WIDTH + frame_thickness = style.GRID_CELL_SIZE x = y = frame_thickness width = gtk.gdk.screen_width() - frame_thickness diff --git a/shell/view/frame/framewindow.py b/shell/view/frame/framewindow.py index 82dcb32..6738bf2 100644 --- a/shell/view/frame/framewindow.py +++ b/shell/view/frame/framewindow.py @@ -25,6 +25,7 @@ class FrameWindow(gtk.Window): def __init__(self, position): gtk.Window.__init__(self) self.hover = False + self.size = style.GRID_CELL_SIZE + style.LINE_WIDTH self._position = position @@ -80,15 +81,12 @@ class FrameWindow(gtk.Window): def append(self, child, flags=0): self._bg.append(child, flags) - + def _update_size(self): if self._position == gtk.POS_TOP or self._position == gtk.POS_BOTTOM: - width = gtk.gdk.screen_width() - height = style.GRID_CELL_SIZE + self.resize(gtk.gdk.screen_width(), self.size) else: - width = style.GRID_CELL_SIZE - height = gtk.gdk.screen_height() - self.resize(width, height) + self.resize(self.size, gtk.gdk.screen_height()) def _realize_cb(self, widget): self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG) -- cgit v0.9.1