Fix several sizing bugs.
This commit is contained in:
parent
dfe8ff6806
commit
de9e02b498
shell/view/frame
@ -268,16 +268,16 @@ class Frame(object):
|
|||||||
screen_w = gtk.gdk.screen_width()
|
screen_w = gtk.gdk.screen_width()
|
||||||
|
|
||||||
self._move_panel(self._top_panel, self._current_position,
|
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,
|
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,
|
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,
|
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):
|
def _hide_completed_cb(self, animator):
|
||||||
self.mode = MODE_NONE
|
self.mode = MODE_NONE
|
||||||
|
@ -29,7 +29,7 @@ class FrameCanvasInvoker(CanvasInvoker):
|
|||||||
return Palette.AROUND
|
return Palette.AROUND
|
||||||
|
|
||||||
def get_screen_area(self):
|
def get_screen_area(self):
|
||||||
frame_thickness = style.GRID_CELL_SIZE - style.LINE_WIDTH
|
frame_thickness = style.GRID_CELL_SIZE
|
||||||
|
|
||||||
x = y = frame_thickness
|
x = y = frame_thickness
|
||||||
width = gtk.gdk.screen_width() - frame_thickness
|
width = gtk.gdk.screen_width() - frame_thickness
|
||||||
|
@ -25,6 +25,7 @@ class FrameWindow(gtk.Window):
|
|||||||
def __init__(self, position):
|
def __init__(self, position):
|
||||||
gtk.Window.__init__(self)
|
gtk.Window.__init__(self)
|
||||||
self.hover = False
|
self.hover = False
|
||||||
|
self.size = style.GRID_CELL_SIZE + style.LINE_WIDTH
|
||||||
|
|
||||||
self._position = position
|
self._position = position
|
||||||
|
|
||||||
@ -83,12 +84,9 @@ class FrameWindow(gtk.Window):
|
|||||||
|
|
||||||
def _update_size(self):
|
def _update_size(self):
|
||||||
if self._position == gtk.POS_TOP or self._position == gtk.POS_BOTTOM:
|
if self._position == gtk.POS_TOP or self._position == gtk.POS_BOTTOM:
|
||||||
width = gtk.gdk.screen_width()
|
self.resize(gtk.gdk.screen_width(), self.size)
|
||||||
height = style.GRID_CELL_SIZE
|
|
||||||
else:
|
else:
|
||||||
width = style.GRID_CELL_SIZE
|
self.resize(self.size, gtk.gdk.screen_height())
|
||||||
height = gtk.gdk.screen_height()
|
|
||||||
self.resize(width, height)
|
|
||||||
|
|
||||||
def _realize_cb(self, widget):
|
def _realize_cb(self, widget):
|
||||||
self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
|
self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
|
||||||
|
Loading…
Reference in New Issue
Block a user