OSDN Git Service

グリッパーの大きさを変更した
authorgdkhd812 <jbh03215@htmil.co.jp>
Tue, 1 Oct 2013 10:39:51 +0000 (19:39 +0900)
committergdkhd812 <jbh03215@htmil.co.jp>
Tue, 1 Oct 2013 10:39:51 +0000 (19:39 +0900)
Metro/FooEditEngnine/Direct2D/D2DRenderBase.cs
Metro/FooEditEngnine/FooTextBox.cs
Metro/FooEditEngnine/GripperManager.cs

index 9326c24..3b63808 100644 (file)
@@ -26,7 +26,7 @@ namespace FooEditEngine
 {
     class D2DRenderBase: IDisposable
     {
-        public const int CramToFitWidth = 30;   //訂正できる場合はこの値を使う
+        public const int GripperWidth = 40;
         public const int MiniumeWidth = 40;    //これ以上ないと誤操作が起こる
 
         protected DXGI.Device DXGIDevice;
index de6e841..0fc9f98 100644 (file)
@@ -77,7 +77,7 @@ namespace FooEditEngine.Metro
             this.rectangle.Margin = this.Padding;\r
             this.Render = new D2DRender(this,this.rectangle,this.textStore);\r
 \r
-            this.View = new EditView(this.Document, this.Render, new Margin(D2DRender.CramToFitWidth / 2, D2DRender.CramToFitWidth, D2DRender.CramToFitWidth / 2, D2DRender.CramToFitWidth));\r
+            this.View = new EditView(this.Document, this.Render, new Margin(D2DRender.GripperWidth / 2, D2DRender.GripperWidth, D2DRender.GripperWidth / 2, D2DRender.GripperWidth));\r
             this.View.SrcChanged += View_SrcChanged;\r
             this.View.InsertMode = this.InsertMode;\r
             this.View.DrawLineNumber = this.DrawLineNumber;\r
index c86e905..77c0a32 100644 (file)
@@ -52,19 +52,19 @@ namespace FooEditEngine
         {
             TextPoint tp;
             Point point;
-            double radius = D2DRender.CramToFitWidth / 2;
+            double radius = D2DRender.GripperWidth / 2;
             if (type == GripperType.Second)
             {
                 tp = this.View.LayoutLines.GetTextPointFromIndex(this.Controller.SelectionStart + this.Controller.SelectionLength);
                 point = this.View.GetPostionFromTextPoint(tp);
                 double lineHeight = this.View.LayoutLines.GetLayout(tp.row).Height;
-                return new Rectangle(point.X - radius, point.Y + lineHeight, D2DRender.CramToFitWidth, D2DRender.CramToFitWidth);
+                return new Rectangle(point.X - radius, point.Y + lineHeight, D2DRender.GripperWidth, D2DRender.GripperWidth);
             }
             else if (type == GripperType.First)
             {
                 tp = this.View.LayoutLines.GetTextPointFromIndex(this.Controller.SelectionStart);
                 point = this.View.GetPostionFromTextPoint(tp);
-                return new Rectangle(point.X - radius, point.Y - D2DRender.CramToFitWidth, D2DRender.CramToFitWidth, D2DRender.CramToFitWidth);
+                return new Rectangle(point.X - radius, point.Y - D2DRender.GripperWidth, D2DRender.GripperWidth, D2DRender.GripperWidth);
             }
             else
             {