diff dwt/widgets/Spinner.d @ 90:c7f7f4d7091a

All widgets are ported
author Jacob Carlborg <doob@me.com>
date Tue, 30 Dec 2008 18:54:31 +0100
parents 990305995bc6
children 63a09873578e
line wrap: on
line diff
--- a/dwt/widgets/Spinner.d	Tue Dec 30 17:01:10 2008 +0100
+++ b/dwt/widgets/Spinner.d	Tue Dec 30 18:54:31 2008 +0100
@@ -42,7 +42,7 @@
 import dwt.internal.cocoa.SWTTextField;
 import dwt.internal.cocoa.SWTView;
 
-import dwt.internal.c.Carbon;
+import Carbon = dwt.internal.c.Carbon;
 import objc = dwt.internal.objc.runtime;
 import dwt.widgets.Composite;
 import dwt.widgets.Event;
@@ -220,7 +220,7 @@
 
 public Point computeSize (int wHint, int hHint, bool changed) {
     checkWidget ();
-    CGFloat width = 0, height = 0;
+    Carbon.CGFloat width = 0, height = 0;
     String string = Double.toString (buttonView.maxValue ());
     NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity (1);
     dict.setObject(textView.font (), OS.NSFontAttributeName);
@@ -458,7 +458,7 @@
                 } else {
                     int i = digits - decimalPart.length ();
                     for (int j = 0; j < i; j++) {
-                        decimalPart = decimalPart + "0";
+                        decimalPart = decimalPart ~ "0";
                     }
                 }
                 int wholeValue = Integer.parseInt (wholePart);
@@ -664,7 +664,7 @@
     buttonFrame.y = 0;
     frame.x = 0;
     frame.y = 0;
-    frame.width -= buttonFrame.width + GAP;
+    frame.size.width -= buttonFrame.width + GAP;
     textView.setFrame(frame);
     buttonView.setFrame(buttonFrame);
 }
@@ -913,7 +913,7 @@
         String decimalSeparator = ".";//getDecimalSeparator ();
         index = string.indexOf (decimalSeparator);
         if (index !is -1) {
-            string = string.substring (0, index) + string.substring (index + 1);
+            string = string.substring (0, index) ~ string.substring (index + 1);
         }
         index = 0;
     }