diff mac/dw.m @ 1537:a4ecef1980db

Added code for returning a size for scrolled widgets on OS/2, Windows and Mac... They get 500x200 because this is what GTK seems to recommend. It occurs to me that listboxes may not currently be handled... will have to look into that.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 12 Jan 2012 18:21:54 +0000
parents 7bc189ef0cd0
children 333f07bdbf7c
line wrap: on
line diff
--- a/mac/dw.m	Thu Jan 12 17:21:31 2012 +0000
+++ b/mac/dw.m	Thu Jan 12 18:21:54 2012 +0000
@@ -3403,7 +3403,8 @@
 /* Internal function to calculate the widget's required size..
  * These are the general rules for widget sizes:
  * 
- * Scrolled(Container,Tree,MLE)/Render/Unspecified: 1x1
+ * Render/Unspecified: 1x1
+ * Scrolled(Container,Tree,MLE): 500x200
  * Entryfield/Combobox/Spinbutton: 150x(maxfontheight)
  * Spinbutton: 50x(maxfontheight)
  * Text/Status: (textwidth)x(textheight)
@@ -3526,6 +3527,14 @@
             thisheight = size.height;
         }
     }
+    /* MLE, Container and Tree */
+    else if([ object isMemberOfClass:[DWMLE class] ] ||
+            [ object isMemberOfClass:[DWContainer class] ] ||
+            [ object isMemberOfClass:[DWTree class] ])
+    {
+        thiswidth = 500;
+        thisheight = 200;
+    }
     /* Any other control type */
     else if([ object isKindOfClass:[ NSControl class ] ])
         nsstr = [object stringValue];