mbColorLib: Fix hints not appearing after re-entry of ColorPalette and HexaColorPicker

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5520 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-12-16 18:47:15 +00:00
parent 90314c0876
commit de18ef6bad
2 changed files with 9 additions and 3 deletions

View File

@ -1002,6 +1002,7 @@ procedure THexaColorPicker.CMHintShow(
var
Index: Integer;
Colors: TCombArray;
cp: TPoint;
begin
Colors := nil;
if (GetColorUnderCursor <> clNone) or PtInRect(FSliderRect, Point(mX, mY)) then
@ -1015,9 +1016,11 @@ begin
begin
// show that we want a hint
Result := 0;
ReshowTimeout := 1;
cp := CursorPos;
ReshowTimeout := 0; //1;
HideTimeout := 5000;
if PtInRect(FSliderRect, Point(CursorPos.X, CursorPos.Y)) and FSliderVisible then
HintInfo^.CursorRect := Rect(cp.X, cp.Y, cp.X+1, cp.Y+1);
if PtInRect(FSliderRect, cp) and FSliderVisible then
begin
// in case of the intensity slider we show the current intensity
HintStr := FIntensityText + Format(': %d%%', [Round(100 * FCenterIntensity)]);

View File

@ -1012,6 +1012,7 @@ procedure TmbColorPalette.CMHintShow(
var
clr: TColor;
Handled: boolean;
cp: TPoint;
begin
if (Colors.Count > 0) and (FIndex > -1) then
with TCMHintShow(Message) do
@ -1024,7 +1025,9 @@ begin
begin
// show that we want a hint
Result := 0;
ReshowTimeout := 1;
ReshowTimeout := 0; //1;
cp := CursorPos;
HintInfo^.CursorRect := Rect(cp.X, cp.Y, cp.X+1, cp.Y+1);
HideTimeout := Application.HintHidePause; // was: 5000
clr := GetColorUnderCursor;
//fire event