#REFACTORING
authorStefan Vogel <sv@exept.de>
Sat, 13 Feb 2016 21:22:31 +0100
changeset 7139 2f29ef1d7392
parent 7136 2b0b61ff4df5
child 7140 9c2e17ff88f8
#REFACTORING class: DeviceWorkstation changed: #preferredIconSize
DeviceWorkstation.st
--- a/DeviceWorkstation.st	Thu Feb 11 00:57:54 2016 +0100
+++ b/DeviceWorkstation.st	Sat Feb 13 21:22:31 2016 +0100
@@ -2242,36 +2242,34 @@
 !
 
 preferredIconSize
-    "Get the preferrered icon size. These are typically set by the window manager.
-     We return nil here (as if there are no special size preferences)."
+    "Get the preferrered icon size. These are typically set by the window manager."
 
     |sizes spec sz sz2|
 
     preferredIconSize isNil ifTrue:[
-	sizes := self iconSizes.
-	sizes notNil ifTrue:[
-	    spec := sizes first.
-
-	    "/ we prefer square icons ...
-
-	    sz := (spec at:#maxWidth) min: (spec at:#maxHeight).
-	    sz > 64 ifTrue:[
-		sz2 := (spec at:#minWidth) max: (spec at:#minHeight).
-		sz2 <= 48 ifTrue:[
-		    sz := 48
-		]
-	    ].
-	    preferredIconSize := sz @ sz
-	].
-	preferredIconSize isNil ifTrue:[
-	    preferredIconSize := 48@48
-	].
+        sizes := self iconSizes.
+        sizes notNil ifTrue:[
+            spec := sizes first.
+
+            "/ we prefer square icons ...
+            sz := (spec at:#maxWidth) min: (spec at:#maxHeight).
+            sz > 64 ifTrue:[
+                sz2 := (spec at:#minWidth) max: (spec at:#minHeight).
+                sz2 <= 48 ifTrue:[
+                    sz := 48
+                ]
+            ].
+            preferredIconSize := sz @ sz
+        ] ifFalse:[
+            preferredIconSize := 48@48
+        ].
     ].
 
     ^ preferredIconSize
 
     "
-     Display preferredIconSize
+     Display preferredIconSize:nil.
+     Display preferredIconSize.
      Display preferredIconSize:32@32
      Display preferredIconSize:nil
     "