tSpeedButton.CMParentColorChanged (var Message: TWMNoParams); begin inherited; if FUseAdvColors then begin ParentColor := True; CalcAdvColors; end; Invalidate; end;
procedure TFlatSpeedButton.MouseEnter; begin if Enabled and not FMouseInControl then begin FMouseInControl := True; Repaint; end; end;
procedure TFlatSpeedButton.MouseLeave; begin if Enabled and FMouseInControl and not FDragging then begin FMouseInControl := False; RemoveMouseTimer; Invalidate; end; end;
procedure TFlatSpeedButton.MouseTimerHandler (Sender: TObject); var P: TPoint; begin GetCursorPos (P); if FindDragTarget(P, True) <> Self then MouseLeave; end;
procedure TFlatSpeedButton.RemoveMouseTimer; begin if MouseInControl = Self then begin MouseTimer.Enabled := False; MouseInControl := nil; end; end;