mbColorLib: Fix updating of gradients for AxisColorPickers.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6275 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-03-24 09:52:51 +00:00
parent 8442c16cfc
commit 4ec910db37
3 changed files with 10 additions and 25 deletions

View File

@@ -193,25 +193,20 @@ end;
procedure TGAxisColorPicker.SetBValue(b: integer);
begin
Clamp(b, 0, 255);
FB := b;
SetSelectedColor(RGBToColor(FR, FG, FB));
SetSelectedColor(RGBToColor(FR, FG, b));
end;
procedure TGAxisColorPicker.SetGValue(g: integer);
begin
Clamp(g, 0, 255);
if FG = g then
begin
FG := g;
SetSelectedColor(RGBToColor(FR, FG, FB));
end;
if FG <> g then
SetSelectedColor(RGBToColor(FR, g, FB));
end;
procedure TGAxisColorPicker.SetRValue(r: integer);
begin
Clamp(r, 0, 255);
FR := r;
SetSelectedColor(RGBToColor(FR, FG, FB));
SetSelectedColor(RGBToColor(r, FG, FB));
end;
procedure TGAxisColorPicker.SetSelectedColor(c: TColor);