Skip to content

Commit

Permalink
Update the margins during HFrame resize events and use the new frame …
Browse files Browse the repository at this point in the history
…size to create the new pixmap
  • Loading branch information
realnc committed Aug 15, 2012
1 parent d3af557 commit 53f43c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hframe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,12 @@ HFrame::resizeEvent( QResizeEvent* e )
// Save a copy of the current pixmap.
const QPixmap& tmp = this->fPixmap.copy();

// Adjust the margins so that we get our final size.
hApp->updateMargins(-1);

// Create a new pixmap, using the new size and fill it with
// the default background color.
QPixmap newPixmap(e->size());
QPixmap newPixmap(this->size());
newPixmap.fill(hugoColorToQt(this->fBgColor));

// Draw the saved pixmap into the new one and use it as our new
Expand Down

0 comments on commit 53f43c4

Please sign in to comment.