Version: (using KDE Devel) Installed from: Compiled sources When resizing (enlarging) the KSnapshow window, the screenshot thumbnail is not rescaled to fit the available space. It should. Also, the lower panel (the area over the horizontal line) is resized vertically. It should not, since it doesn't contain any text to fill the added vertical space. Only the upper panel should be resized.
> Also, the lower panel (the area over the horizontal line) is resized > vertically. It should not, since it doesn't contain any text to fill the > added vertical space. Only the upper panel should be resized. I agree, removing the widget named "spacer3" from ksnapshot/ksnapshotwidget.ui fixes it, leaving more space for the snapshot preview.
Created attachment 10926 [details] Patch for this bug This patch should "fix" this bug. As it is my first patch I should be carefully reviewed, I'm not sure if this is the best way to do it or even if I'm breaking anything else, but it's working here against latest SVN :) Best regards
SVN commit 410274 by binner: Rescale screenshot preview when resizing window Patch by Isaac Clerencia <isaac@sindominio.net> BUG: 104895 M +9 -0 branches/KDE/3.4/kdegraphics/ksnapshot/ksnapshot.cpp M +3 -1 branches/KDE/3.4/kdegraphics/ksnapshot/ksnapshot.h --- branches/KDE/3.4/kdegraphics/ksnapshot/ksnapshot.cpp #410273:410274 @@ -114,6 +114,7 @@ } connect( &grabTimer, SIGNAL( timeout() ), this, SLOT( grabTimerDone() ) ); + connect( &updateTimer, SIGNAL( timeout() ), this, SLOT( updatePreview() ) ); QTimer::singleShot( 0, this, SLOT( updateCaption() ) ); KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), false); @@ -151,6 +152,14 @@ { } +void KSnapshot::resizeEvent( QResizeEvent *event) +{ + if( !updateTimer.isActive() ) + updateTimer.start(200, true); + else + updateTimer.changeInterval(200); +} + bool KSnapshot::save( const QString &filename ) { return save( KURL::fromPathOrURL( filename )); --- branches/KDE/3.4/kdegraphics/ksnapshot/ksnapshot.h #410273:410274 @@ -85,17 +85,18 @@ void reject() { close(); } virtual void closeEvent( QCloseEvent * e ); + void resizeEvent(QResizeEvent*); bool eventFilter( QObject*, QEvent* ); private slots: void grabTimerDone(); void slotDragSnapshot(); void updateCaption(); + void updatePreview(); void slotRegionGrabbed( const QPixmap & ); private: bool save( const KURL& url ); - void updatePreview(); void performGrab(); void autoincFilename(); int grabMode(); @@ -103,6 +104,7 @@ QPixmap snapshot; QTimer grabTimer; + QTimer updateTimer; QWidget* grabber; KURL filename; KSnapshotWidget *mainWidget;