ImageView.st
changeset 5599 44f47228bec2
parent 5597 fd48983043d6
child 5610 72882e1d2bee
--- a/ImageView.st	Mon Sep 11 09:11:07 2017 +0200
+++ b/ImageView.st	Wed Sep 13 10:16:04 2017 +0200
@@ -124,17 +124,37 @@
          (MenuItem
             label: 'Size to Fit'
             choice: adjustHolder
-            choiceValue: #fitBig
+            choiceValue: fitBig
           )
          (MenuItem
             label: 'Size to Fit (smooth)'
             choice: adjustHolder
-            choiceValue: #smoothFitBig
+            choiceValue: smoothFitBig
           )
          (MenuItem
             label: 'Original Size'
             choice: adjustHolder
-            choiceValue: #topLeft
+            choiceValue: topLeft
+          )
+         (MenuItem
+            label: 'Magnify'
+            submenu: 
+           (Menu
+              (
+               (MenuItem
+                  label: '* 2'
+                  itemValue: magnifyBy:
+                  argument: 2
+                )
+               (MenuItem
+                  label: '* 4'
+                  itemValue: magnifyBy:
+                  argument: 4
+                )
+               )
+              nil
+              nil
+            )
           )
          (MenuItem
             label: '-'
@@ -150,7 +170,7 @@
         nil
       )
 
-    "Modified: / 10-09-2017 / 18:16:56 / cg"
+    "Modified: / 13-09-2017 / 09:45:43 / cg"
 ! !
 
 !ImageView class methodsFor:'queries-plugin'!
@@ -866,6 +886,14 @@
     "Modified: / 19-02-2017 / 23:01:14 / cg"
 !
 
+magnifyBy:scale
+    self adjustHolder value:#Mag.
+    self adjust:#topLeft.
+    self magnificationFactor:scale.
+
+    "Created: / 13-09-2017 / 09:43:11 / cg"
+!
+
 middleButtonMenu
     menuHolder notNil ifTrue:[^ super middleButtonMenu].
     ^ self class middleButtonMenu