Bug 101725 - Window size too small
Summary: Window size too small
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-17 19:40 UTC by Andrew Walker
Modified: 2005-03-21 04:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2005-03-17 19:40:33 UTC
Version:           HEAD (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources
OS:                Linux

PROBLEM: Newly created windows are too small to be useful.

STEPS TO REPRODUCE:
Start Kst
Switch to childframe mode (if necessary) [Window...MDI Mode... Childframe mode]
Create a new window [Window...New...]
Resize the window to a reasonable size
Create another new window

RESULTS:
Both newly created windows are the same (very small) size

EXPECTED RESULTS:
The first window should have a reasonable default size.
The second window should have the same size as the resized first.
Comment 1 Andrew Walker 2005-03-18 01:35:10 UTC
One solution to this would be to remove the call to setMinimumSize(...) in KstViewWidget and the _assert on a null pixmap in kst2dplot.cpp. If there are no other suggestions I'll implement this.
Comment 2 George Staikos 2005-03-18 02:19:47 UTC
On Thursday 17 March 2005 19:35, Andrew Walker wrote:
> ------- One solution to this would be to remove the call to
> setMinimumSize(...) in KstViewWidget and the _assert on a null pixmap in
> kst2dplot.cpp. If there are no other suggestions I'll implement this.


   I suggest following the preconditions of KstViewObject, and not allowing 
breakage in the code by allowing invalid view objects to exist.
Comment 3 George Staikos 2005-03-21 04:37:09 UTC
CVS commit by staikos: 

use KMDI's own size hint
BUG: 101725


  M +1 -1      kst.cpp   1.296
  M +1 -1      kstdoc.cpp   1.155


--- kdeextragear-2/kst/kst/kst.cpp  #1.295:1.296
@@ -1798,5 +1798,5 @@ QString KstApp::newWindow(const QString&
   w->setCaption(nameToUse);
   w->setTabCaption(nameToUse);
-  addWindow(w);
+  addWindow(w, KMdi::StandardAdd | KMdi::UseKMdiSizeHint);
   w->activate();
   updateDialogsForWindow();

--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.154:1.155
@@ -350,5 +350,5 @@ bool KstDoc::openDocument(const KURL& ur
 
         p = new KstViewWindow(e);
-        app->addWindow(p);
+        app->addWindow(p, KMdi::StandardAdd | KMdi::UseKMdiSizeHint);
         p->activate();
         if (toDelete) {