[Bug 164800] kickoff does not save size, after logout size is back to default

Tim Beaulen tbscope at gmail.com
Tue Jun 24 20:49:48 CEST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=164800         




------- Additional Comments From tbscope gmail com  2008-06-24 20:49 -------
"And if the width or height is too small, it uses the minimumSizeHint, which seems to be the default."

That's not correct.

I've added some debugging lines in launcher.cpp
kde4-devel localhost ~/kde/src/kdebase/workspace/plasma/applets/kickoff $ svn diff                                                          
Index: ui/launcher.cpp                                                                                                                      
===================================================================
--- ui/launcher.cpp     (revision 823779)
+++ ui/launcher.cpp     (working copy)
 @ -639,6 +639,7  @
     }
     const int width = qMin(sizeGroup.readEntry("Width", 0), QApplication::desktop()->screen()->width()-50);
     const int height = qMin(sizeGroup.readEntry("Height", 0), QApplication::desktop()->screen()->height()-50);
+    kDebug() << " ### KICKOFF LOAD FROM CONFIG ### width = " << width << " and height = " << height;
     QSize wanted(width, height);
     bool isDefault = wanted.isNull();
     wanted = wanted.expandedTo(minimumSizeHint());
 @ -646,6 +647,8  @
        wanted.setHeight( wanted.height() + ( d->favoritesView->sizeHintForRow(0) * (d->visibleItemCount - 3) ) );
     }

+    kDebug() << " ### KICKOFF WANTED ### width = " << wanted.width() << " and height = " << wanted.height();
+
     return wanted;
 }

 @ -977,6 +980,8  @
 void Launcher::resizeEvent(QResizeEvent *e)
 {
     d->adjustResizeHandlePosition();
+
+    kDebug() << " ### KICKOFF RESIZE EVENT ### size = " << e->size();
     QWidget::resizeEvent(e);
 }

 @ -1000,6 +1005,7  @
        }
        sizeGroup.writeEntry("Height", height());
        sizeGroup.writeEntry("Width", width());
+       kDebug() << " ### KICKOFF SAVING ### width = " << width() << " and height = " << height();
        emit configNeedsSaving();
     }
     QWidget::mouseReleaseEvent(e);



This gives the following results:

Run 1: Setting the size of kickoff to 368x287, kquitapp plasma, plasma
This gives the following debug lines:

        ...
        plasma(6764) Kickoff::Launcher::sizeHint:  ### KICKOFF LOAD FROM CONFIG ### width =  368  and height =  287
        plasma(6764) Kickoff::Launcher::sizeHint:  ### KICKOFF WANTED ### width =  368  and height =  287
        ...
        plasma(6764) Kickoff::Launcher::resizeEvent:  ### KICKOFF RESIZE EVENT ### size =  QSize(368, 287)
        ...


Run 2: Setting the size of kickoff to 482x378, kquitapp plasma, plasma
This gives the following debug lines:

        ....
        plasma(6785) Kickoff::Launcher::sizeHint:  ### KICKOFF LOAD FROM CONFIG ### width =  482  and height =  378
        plasma(6785) Kickoff::Launcher::sizeHint:  ### KICKOFF WANTED ### width =  482  and height =  378
        ...
        plasma(6785) Kickoff::Launcher::resizeEvent:  ### KICKOFF RESIZE EVENT ### size =  QSize(482, 378)
        ...


Run 3: Setting the size of kickoff to 685x516, kquitapp plasma, plasma
This gives the following debug lines:

        ....
        plasma(6792) Kickoff::Launcher::sizeHint:  ### KICKOFF LOAD FROM CONFIG ### width =  685  and height =  516
        plasma(6792) Kickoff::Launcher::sizeHint:  ### KICKOFF WANTED ### width =  685  and height =  516
        ....
        plasma(6792) Kickoff::Launcher::resizeEvent:  ### KICKOFF RESIZE EVENT ### size =  QSize(682, 512)
        ....


Run 3: Setting the size of kickoff to 992x706, kquitapp plasma, plasma
This gives the following debug lines:

        ....
        plasma(6798) Kickoff::Launcher::sizeHint:  ### KICKOFF LOAD FROM CONFIG ### width =  974  and height =  706
        plasma(6798) Kickoff::Launcher::sizeHint:  ### KICKOFF WANTED ### width =  974  and height =  706
        ....
        plasma(6798) Kickoff::Launcher::resizeEvent:  ### KICKOFF RESIZE EVENT ### size =  QSize(682, 512)
        ....


Conclusion:
Above a size of 682x512, kickoff seems to be limited (on my pc, I don't know where these numbers come from).
All the sizes are saved and loaded correctly.
Sizes smaller than 682x512 are displayed correctly too.


More information about the Panel-devel mailing list