Skip to content

Commit

Permalink
make banners height as much as view window
Browse files Browse the repository at this point in the history
  • Loading branch information
mtivadar committed Jun 21, 2015
1 parent ce89cd4 commit e6d6cf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Banners.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def resize(self, width, height):
for banner in self._Banners:
# banners are not resizeable actually
if banner.getOrientation() == Orientation.Left:
banner.resize(banner.getDesiredGeometry(), height - limit)
banner.resize(banner.getDesiredGeometry(), height - limit + 4) # +4 , make to look nice

if banner.getOrientation() == Orientation.Bottom:
banner.resize(width, banner.getDesiredGeometry())
Expand Down
4 changes: 3 additions & 1 deletion qiew.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ def switchViewMode(self):
def _resize(self):

self.Banners.resize(self.size().width() - self.offsetWindow_h, self.size().height() - self.offsetWindow_v)


# compute space ocupated by banners
offsetLeft = self.offsetWindow_h + self.Banners.getLeftOffset()
offsetBottom = self.offsetWindow_v + self.Banners.getBottomOffset() + self.Banners.getTopOffset()

# resize window, substract space ocupated by banners
self.viewMode.resize(self.size().width() - offsetLeft, self.size().height() - offsetBottom)

# event handlers
Expand Down

0 comments on commit e6d6cf7

Please # to comment.