Version: 0.8.5 (using KDE 3.1.0 (RC5)) Installed from: compiled sources Compiler: gcc version 3.2 OS: Linux (i686) release 2.4.19-gentoo-r10 When doing double click to close the image and go to file view, the file view widget isn't resized to fit the window in some cases. To reproduce: 1. Start kuickshow by clicking an image in konqueror. Be sure to be in a directory with more than one image. 2. Hit page up or page down to flip to a different image. 3. Double click image to close image and load file browser --> The file view widget isn't correctly sized.
Subject: kdegraphics/kuickshow/src CVS commit by pfeiffer: Weird bug. Work around it. CCMAIL: 51610-close@bugs.kde.org M +5 -1 kuickshow.cpp 1.56 --- kdegraphics/kuickshow/src/kuickshow.cpp:1.55 Sun Nov 17 04:49:49 2002 @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id: kuickshow.cpp,v 1.55 2002/11/17 03:49:49 pfeiffer Exp $ +** $Id: kuickshow.cpp,v 1.56 2002/12/07 15:35:27 pfeiffer Exp $ ** ** KuickShow - a fast and comfortable image viewer based on Rasterman's Imlib ** @@ -790,6 +790,10 @@ QFileInfo fi( m_viewer->filename() ); start.setPath( fi.dirPath( true ) ); initGUI( start ); + // ### somehow the filewidget isn't resized at all here + // (just a tiny little widget in the upper left corner + // of the mainwindow. Work around that. + fileWidget->resize( size() ); } show(); raise();
I don't get any difference from this fix. I still have the same behaviour. (Running KDE_3_1_BRANCH and qt-copy HEAD)
Ok, I think I found it.. the resize needs to be outside of the if (!fileWidget) check Like (I really should learn how to use diff.. I'm a unix n00b..) this: if ( !fileWidget ) { //stuff } fileWidget->resize( size() ); Unless I totally misread it, KuickShow::slotAdvanceImage() gets called when the user flips image. This calls KuickShow::initGUI(), which creates the fileWidget. This makes the if(!fileWidget) check fail and the resize never gets run.
Subject: Re: double click to close image and load file view broken On Sunday 08 December 2002 07:37, you wrote: > Ok, I think I found it.. the resize needs to be outside of the if > (!fileWidget) check Hmm, this is another case then. How does this happen to you? What I did was: launch kuickshow with an image filename as parameter (as when clicking in konq on a jpeg for example). Then doubleclicked on that image. With the patch applied, it worked for me. If you do it outside the if ( !fileWidget ) part, then it will resize everytime when you doubleclick a window. But this should not be necessary, because when you start kuickshow normally and a filewidget is created, then it is already resized properly. Can you name any other case, where it isn't? > Like (I really should learn how to use diff.. I'm a unix n00b..) this: diff -u oldfile newfile > somefilename.patch Easy as pie :) Cheers Carsten Pfeiffer -----BEGIN PGP SIGNATURE----- iQEVAwUBPfMsh6WgYMJuwmZtAQFf7QgAnqgQTH856pRgSPd21cEqAt4KXOdgbuQ5 wz/avCg2A0qoHkGUG291AF8MLIWKG4as8afIh5VXVdgpdFFN442yFyRJWkuXSzDU s8R1H57vjmX2bt1PCWym8u7TeL9wrsB09s8JOidPU5poODCujFYUGVUmlkTM+CRT VxsqxfLEdZhIQgrQC9P3QXrsnAuPYZn5Ihysoc4V12fIkcqpbr7dM1T97seVSI79 U6ySqYYsmGw/nw9S8SkwGExAz11MIIBBm/cZIh1hXlVXZHdbgzwSvR+GcKrteANl BYWztR0F+fsW5Z6fcLiqC5LPCn2F+55SN6ernhiFZ9hmkQWWJFcEcA== =l04K -----END PGP SIGNATURE-----
>What I did was: launch kuickshow with an image filename as >parameter (as when clicking in konq on a jpeg for example). >Then doubleclicked on that image. This always worked for me. What I did was: 1. Start kuickshow by clicking an image in konqueror. 2. Hit page up or page down to flip to a different image. 3. Double click image to close image and load file browser Note 2! Without this step, I don't see an error and never did. Regards, Jens Dagerbo
Subject: kdegraphics/kuickshow/src CVS commit by pfeiffer: 2nd attempt at fixing #51610 CCMAIL: 51610-close@bugs.kde.org Always resize the filewidget manually at the end of initGUI() M +6 -5 kuickshow.cpp 1.57 --- kdegraphics/kuickshow/src/kuickshow.cpp #1.56:1.57 @@ -316,4 +316,9 @@ void KuickShow::initGUI( const KURL& sta coll->action( "preview" )->setShortcut(Key_F11); coll->action( "separate dirs" )->setShortcut(Key_F12); + + // ### somehow the filewidget isn't resized at all sometimes, when initGUI + // is called lazily, not from this c'tor. (just a tiny little widget in + // the upper left corner of the mainwindow. Work around that. + fileWidget->resize( size() ); } @@ -791,8 +796,4 @@ bool KuickShow::eventFilter( QObject *o, start.setPath( fi.dirPath( true ) ); initGUI( start ); - // ### somehow the filewidget isn't resized at all here - // (just a tiny little widget in the upper left corner - // of the mainwindow. Work around that. - fileWidget->resize( size() ); } show();