Commit 6a2094614ce9cad0130b3c4165b1e31fe7b66c1a
1 parent
e226f069
make sure ImageViewer redraws after a resize event
Showing
2 changed files
with
6 additions
and
0 deletions
openbr/gui/imageviewer.cpp
| ... | ... | @@ -78,6 +78,11 @@ void br::ImageViewer::updatePixmap(QImage image, bool async) |
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | +QSize br::ImageViewer::sizeHint() const | |
| 82 | +{ | |
| 83 | + return QSize(width(), (src.height() * width() + /* round up */ src.width() - 1) / src.width()); | |
| 84 | +} | |
| 85 | + | |
| 81 | 86 | /*** PROTECTED SLOTS ***/ |
| 82 | 87 | void br::ImageViewer::keyPressEvent(QKeyEvent *event) |
| 83 | 88 | { | ... | ... |