mbControls: Refactoring of the 2D gradients and code used in several units over again.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5461 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-12-11 15:10:49 +00:00
parent 8daab50f04
commit 8b1a85037f
21 changed files with 2431 additions and 2911 deletions

View File

@@ -61,11 +61,14 @@ end;
constructor THColorPicker.Create(AOwner: TComponent);
begin
inherited;
FGradientWidth := 256;
FGradientWidth := 360;
FGradientHeight := 12;
{$IFDEF DELPHI}
Width := 267;
Height := 22;
{$ELSE}
SetInitialBounds(0, 0, 267, 22);
//Width := 267;
//Height := 22;
{$ENDIF}
FSat := 255;
FVal := 255;
FArrowPos := ArrowPosFromHue(0);
@@ -78,6 +81,7 @@ end;
function THColorPicker.GetGradientColor(AValue: Integer): TColor;
begin
if Layout = lyVertical then AValue := 360 - AValue;
Result := HSVtoColor(AValue, FSat, FVal);
end;