Summary: | Screenshot can get cropped (i.e. shown only partially) by resizing window | ||
---|---|---|---|
Product: | [Unmaintained] ksnapshot | Reporter: | Andreas Klöckner <inform> |
Component: | general | Assignee: | Richard Moore <rich> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 0.7 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andreas Klöckner
2004-11-12 15:15:02 UTC
Is this just a problem with the thumbnail? That is, is the screenshot itself OK? You mentioned resizing the window fixes it. If you just resize the ksnapshot window horizontally, does it get fixed? If you just resize the ksnapshot window vertically, does it get fixed? The screenshot itself is ok. It is purely a problem of the widget displaying it. Horizontal resizing doesn't change anything as the screenshot thumbnail is fully visible in that direction. Vertical resizing does change something. That is, I can resize the window so that the top and the bottom of the screenshot thumbnail disappear. This is especially visible since the panel seems to "disappear" from the screenshot. OK, I'm seeing the problem. It is a bit trickier to fix than I first thought - enlarging the window vertically causes horizontal cropping on 1024x768.... CVS commit by bhards: Change the way the snapshot preview is displayed, which prevents it being cut-off at the bottom with some display resolutions. Thanks to Andreas Klöckner for the bug report and helping to clarify the issue. BUGS:93170 M +5 -2 ksnapshotwidget.ui.h 1.6 --- kdegraphics/ksnapshot/ksnapshotwidget.ui.h #1.5:1.6 @@ -32,8 +32,10 @@ void KSnapshotWidget::setPreview( const double r1 = ( ( double ) pm.height() ) / pm.width(); if ( r1 * previewWidth() < previewHeight() ) - img = img.smoothScale( previewWidth(), int( previewWidth() * r1 ) ); + img = img.smoothScale( previewWidth(), + int( previewWidth() * r1 ), + QImage::ScaleMin ); else img = img.smoothScale( ( int ) ( ( ( double )previewHeight() ) / r1 ), - previewHeight() ); + previewHeight(), QImage::ScaleMin ); QToolTip::remove( lblImage ); @@ -43,4 +45,5 @@ void KSnapshotWidget::setPreview( const lblImage->setPixmap( img ); + lblImage->adjustSize(); } |