Răsfoiți Sursa

negative values for shadow offs

Johann 6 ani în urmă
părinte
comite
1d397d376a
3 a modificat fișierele cu 23 adăugiri și 3 ștergeri
  1. 18 0
      lazpaint/lazpaintmainform.lfm
  2. 3 3
      lazpaint/lazpaintmainform.pas
  3. 2 0
      lazpaint/maintoolbar.inc

+ 18 - 0
lazpaint/lazpaintmainform.lfm

@@ -311,6 +311,7 @@ object FMain: TFMain
       Hint = 'Pen opacity'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -426,6 +427,7 @@ object FMain: TFMain
       Hint = 'Secondary color opacity'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -565,6 +567,7 @@ object FMain: TFMain
       Hint = 'Pen width'
       Top = 2
       Width = 58
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -734,6 +737,7 @@ object FMain: TFMain
       Hint = 'Eraser opacity'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -893,6 +897,7 @@ object FMain: TFMain
       Height = 25
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -1312,6 +1317,7 @@ object FMain: TFMain
       Hint = 'Horizontal size of the arrow'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -1427,6 +1433,7 @@ object FMain: TFMain
       Hint = 'Vertical size of the arrow'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -1702,6 +1709,7 @@ object FMain: TFMain
       Hint = 'Texture opacity'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -1873,6 +1881,7 @@ object FMain: TFMain
       Height = 25
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -1987,6 +1996,7 @@ object FMain: TFMain
       Height = 25
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -2354,6 +2364,7 @@ object FMain: TFMain
       Hint = 'Text size'
       Top = 2
       Width = 57
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -2469,6 +2480,7 @@ object FMain: TFMain
       Hint = 'Shadow blur'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -2584,6 +2596,7 @@ object FMain: TFMain
       Hint = 'Horizontal shadow offset'
       Top = 2
       Width = 51
+      AllowNegativeValues = True
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -2699,6 +2712,7 @@ object FMain: TFMain
       Hint = 'Vertical shadow offset'
       Top = 2
       Width = 51
+      AllowNegativeValues = True
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -2921,6 +2935,7 @@ object FMain: TFMain
       Hint = 'Border size'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -3060,6 +3075,7 @@ object FMain: TFMain
       Hint = 'Shape altitude'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -3219,6 +3235,7 @@ object FMain: TFMain
       Hint = 'Text outline width'
       Top = 2
       Width = 51
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400
@@ -3468,6 +3485,7 @@ object FMain: TFMain
       Hint = 'Spacing between patterns'
       Top = 2
       Width = 48
+      AllowNegativeValues = False
       BarExponent = 1
       Increment = 1
       LongTimeInterval = 400

+ 3 - 3
lazpaint/lazpaintmainform.pas

@@ -1951,7 +1951,7 @@ begin
   try
     if Zoom.EditingZoom then exit;
     toolProcessKey:= true;
-    if (CurrentTool = ptText) and ((UTF8Key = #8) or ((length(UTF8Key)=1) and (UTF8Key[1] in['0'..'9']))) then
+    if (CurrentTool = ptText) and ((UTF8Key = #8) or ((length(UTF8Key)=1) and (UTF8Key[1] in['-','0'..'9']))) then
     begin
       if TextSpinEditFocused then
          toolProcessKey:= false;
@@ -1967,12 +1967,12 @@ begin
         SwitchColors;
         UTF8Key:= '';
       end else
-      if UTF8Key = '+' then
+      if toolProcessKey and (UTF8Key = '+') then
       begin
          ViewZoomIn.Execute;
          UTF8Key := '';
       end else
-      if UTF8Key = '-' then
+      if toolProcessKey and (UTF8Key = '-') then
       begin
          ViewZoomOut.Execute;
          UTF8Key := '';

+ 2 - 0
lazpaint/maintoolbar.inc

@@ -111,12 +111,14 @@ begin
   SpinEdit_ArrowSizeY.Increment := 5;
   SpinEdit_ArrowSizeY.OnChange := @SpinEdit_ArrowSizeChange;
 
+  SpinEdit_TextShadowX.AllowNegativeValues := true;
   SpinEdit_TextShadowX.MinValue := -100;
   SpinEdit_TextShadowX.MaxValue := 100;
   SpinEdit_TextShadowX.Value := 0;
   SpinEdit_TextShadowX.Increment := 1;
   SpinEdit_TextShadowX.OnChange := @SpinEdit_TextShadowXChange;
 
+  SpinEdit_TextShadowX.AllowNegativeValues := true;
   SpinEdit_TextShadowY.MinValue := -100;
   SpinEdit_TextShadowy.MaxValue := 100;
   SpinEdit_TextShadowY.Value := 0;