mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 18:32:39 +02:00
IDEIntf: TColorPropertyEditor.ListDrawValue: fixed wrong values
git-svn-id: trunk@35846 -
This commit is contained in:
parent
f5e46fffd7
commit
22aeb25172
@ -402,7 +402,7 @@ begin
|
||||
Rectangle(ARect.Left, ARect.Top, vRight, vBottom);
|
||||
|
||||
// set things up and do the work
|
||||
Brush.Color := StringToColor(CurValue);
|
||||
Brush.Color := StringToColorDef(CurValue,clNone);
|
||||
Pen.Color := ColorToBorderColor(ColorToRGB(Brush.Color));
|
||||
Rectangle(ARect.Left + 1, ARect.Top + 1, vRight - 1, vBottom - 1);
|
||||
|
||||
|
@ -1915,6 +1915,7 @@ function SysColorToSysColorIndex(Color: TColor): integer;
|
||||
function ColorToRGB(Color: TColor): Longint;
|
||||
function ColorToString(Color: TColor): AnsiString;
|
||||
function StringToColor(const S: shortstring): TColor;
|
||||
function StringToColorDef(const S: shortstring; const DefaultValue: TColor): TColor;
|
||||
procedure GetColorValues(Proc: TGetColorStringProc);
|
||||
function InvertColor(AColor: TColor): TColor;
|
||||
function DecColor(AColor: TColor; AQuantity: Byte): TColor;
|
||||
@ -2573,6 +2574,13 @@ begin
|
||||
Result := TColor(StrToInt(S));
|
||||
end;
|
||||
|
||||
function StringToColorDef(const S: shortstring; const DefaultValue: TColor): TColor;
|
||||
begin
|
||||
Result := DefaultValue;
|
||||
if not IdentToColor(S, Longint(Result)) then
|
||||
Result := TColor(StrToIntDef(S,DefaultValue));
|
||||
end;
|
||||
|
||||
procedure GetColorValues(Proc: TGetColorStringProc);
|
||||
var
|
||||
I: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user