You've already forked lazarus-ccr
mbColorLib: Add locking mechanism for OnChange events. Fix OfficeDlg forgetting selected color if picker type is changed on custom page.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5599 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -53,7 +53,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
Math, mbUtils;
|
||||
Math, mbUtils, PalUtils;
|
||||
|
||||
{ THSColorPicker }
|
||||
|
||||
@ -91,7 +91,10 @@ begin
|
||||
if Focused or (csDesigning in ComponentState) then
|
||||
c := clBlack
|
||||
else
|
||||
c := clWhite;
|
||||
case BrightnessMode of
|
||||
bmLuminance: c := clWhite;
|
||||
bmValue : c := clGray;
|
||||
end;
|
||||
InternalDrawMarker(x, y, c);
|
||||
end;
|
||||
|
||||
@ -154,9 +157,10 @@ begin
|
||||
if WebSafe then c := GetWebSafe(c);
|
||||
|
||||
ColorToHSLV(c, H, S, L, V);
|
||||
{
|
||||
if (H = FHue) and (S = FSat) then
|
||||
exit;
|
||||
|
||||
}
|
||||
FHue := H;
|
||||
FSat := S;
|
||||
FSelected := HSLVtoColor(FHue, FSat, FLum, FVal);
|
||||
|
Reference in New Issue
Block a user