#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Mon, 20 Aug 2018 12:07:40 +0200
changeset 8449 14a297b09f62
parent 8448 81656238ef7b
child 8450 6a603b57665d
#BUGFIX by cg class: SimpleView changed: #height: #width: fix: care for any existing relative part
SimpleView.st
--- a/SimpleView.st	Mon Aug 20 08:14:08 2018 +0200
+++ b/SimpleView.st	Mon Aug 20 12:07:40 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -2860,14 +2862,14 @@
 height:aNumber
     "set the view's height in pixels"
 
-    "/ check: the following leads to an error in the notebook...
-"/    aNumber isInteger ifTrue:[
-"/        height := aNumber.
-"/    ] ifFalse:[
+    relativeExtent notNil ifTrue:[
+        self extent:(relativeExtent x @ aNumber)
+    ] ifFalse:[    
         self extent:(width @ aNumber)
-"/    ].
+    ].
 
     "Modified: / 02-02-2011 / 12:16:44 / cg"
+    "Modified (comment): / 20-08-2018 / 12:07:22 / Claus Gittinger"
 !
 
 heightIncludingBorder
@@ -3723,14 +3725,14 @@
 width:aNumber
     "set the view's width in pixels"
 
-    "/ check: the following leads to an error in the notebook...
-"/    aNumber isInteger ifTrue:[
-"/        width := aNumber.
-"/    ] ifFalse:[
+    relativeExtent notNil ifTrue:[
+        self extent:(aNumber @ relativeExtent y)
+    ] ifFalse:[    
         self extent:(aNumber @ height)
-"/    ]
+    ]
 
     "Modified: / 02-02-2011 / 12:16:26 / cg"
+    "Modified: / 20-08-2018 / 12:07:12 / Claus Gittinger"
 !
 
 widthIncludingBorder