Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-08-17 14:18:57 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-08-17 14:18:57 (GMT)
commitde9e02b498cf157da0b2af7b135a8fd93a7b57ae (patch)
tree9db3a794d40a37f3c97913679e2c2c3bd962c5c2 /shell
parentdfe8ff68065d5191a2ade265432000327b0de7ce (diff)
Fix several sizing bugs.
Diffstat (limited to 'shell')
-rw-r--r--shell/view/frame/frame.py8
-rw-r--r--shell/view/frame/frameinvoker.py2
-rw-r--r--shell/view/frame/framewindow.py10
3 files changed, 9 insertions, 11 deletions
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)