summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiemm/oimagescrollview.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/libopie2/opiemm/oimagescrollview.cpp b/libopie2/opiemm/oimagescrollview.cpp
index 61b2062..a8165a4 100644
--- a/libopie2/opiemm/oimagescrollview.cpp
+++ b/libopie2/opiemm/oimagescrollview.cpp
@@ -159,3 +159,3 @@ void OImageScrollView::init()
- viewport()->setBackgroundColor(white);
+ setBackgroundColor(white);
setFocusPolicy(QWidget::StrongFocus);
@@ -353,3 +353,3 @@ void OImageScrollView::generateImage()
-
+ int twidth,theight;
odebug << " r = " << r << oendl;
@@ -365,3 +365,2 @@ void OImageScrollView::generateImage()
rescaleImage(width(),height());
- resizeContents(_image_data.width(),_image_data.height());
} else if (!FirstResizeDone()||r!=m_last_rot||_image_data.width()==0) {
@@ -373,5 +372,6 @@ void OImageScrollView::generateImage()
m_last_rot = r;
- resizeContents(_image_data.width(),_image_data.height());
}
_pdata.convertFromImage(_image_data);
+ twidth = _image_data.width();
+ theight = _image_data.height();
@@ -383,2 +383,3 @@ void OImageScrollView::generateImage()
rescaleImage( 128, 128 );
+ resizeContents(twidth,theight);
/*
@@ -395,2 +396,5 @@ void OImageScrollView::generateImage()
_image_data=QImage();
+ if (isVisible()) {
+ updateContents(contentsX(),contentsY(),width(),height());
+ }
}
@@ -439,3 +443,3 @@ void OImageScrollView::drawContents(QPainter * p, int clipx, int clipy, int clip
if (!_pdata.size().isValid()) {
- p->fillRect(clipx,clipy,clipw,cliph,white);
+ p->fillRect(clipx,clipy,clipw,cliph, backgroundColor());
return;
@@ -457,3 +461,3 @@ void OImageScrollView::drawContents(QPainter * p, int clipx, int clipy, int clip
if (erase||_original_data.hasAlphaBuffer()) {
- p->fillRect(clipx,clipy,clipw,cliph,white);
+ p->fillRect(clipx,clipy,clipw,cliph, backgroundColor());
}