[Kst] [Bug 141612] Kst starts with smallest possible window size

Andrew Walker arwalker at sumusltd.com
Wed May 2 19:07:06 CEST 2007


------- 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=141612         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2007-05-02 19:07 -------
SVN commit 660418 by arwalker:

BUG:141612 Set the default window size to something reasonable the first time kst is run. On subsequent runs the value from kstrc will be used. Fixed for 1.5 release. Also removed obsolete FIXMEs.

 M  +5 -2      main.cpp  


--- branches/work/kst/1.5/kst/src/kst/main.cpp #660417:660418
 @ -24,6 +24,7  @
 #include <kaboutdata.h>
 #include <kcmdlineargs.h>
 #include "ksdebug.h"
+#include <kglobalsettings.h>
 #include <kimageio.h>
 
 #include "dialoglauncher-gui.h"
 @ -415,6 +416,8  @
 
     if (!print_and_exit) {
       app.setMainWidget(kst);
+      QRect rect = KGlobalSettings::desktopGeometry(kst);
+      kst->resize(5 * rect.width() / 6, 5 * rect.height() / 6);
       kst->show();
     }
 
 @ -542,7 +545,7  @
                 if (yvector) {
                   // make the curves
                   color = KstColorSequence::next(vcurves,plot->backgroundColor());
-                  curve = new KstVCurve(KST::suggestCurveName(yvector->tag(), false), // FIXME: this was yvector->field(), is this right?
+                  curve = new KstVCurve(KST::suggestCurveName(yvector->tag(), false),
                                       KstVectorPtr(xvector), KstVectorPtr(yvector),
                                       0L, 0L, 0L, 0L, color);
                   if (in.has_points) {
 @ -667,7 +670,7  @
 
                 KstHistogram::AutoBin(KstVectorPtr(yvector), &N, &max, &min);
 
-                hs = new KstHistogram(KST::suggestHistogramName(yvector->tag()), // FIXME: this was yvector->field(), is this right?
+                hs = new KstHistogram(KST::suggestHistogramName(yvector->tag()),
                     KstVectorPtr(yvector), min, max, N, KST_HS_NUMBER);
                 KstVCurvePtr vc = new KstVCurve(KST::suggestCurveName(hs->tag(), true),
                     hs->vX(), hs->vY(),


More information about the Kst mailing list