spkToolbar: Revert the timer introduced in r2882, 2784, 2784, 2786 - it causes slow repainting of the toolbar when form is resized

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3651 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-10-13 19:18:37 +00:00
parent 966611fcfe
commit b38a85d511

View File

@ -114,7 +114,6 @@ type
/// <summary>Pomocnicza bitmapa przekazywana na ¿yczenie elementom /// <summary>Pomocnicza bitmapa przekazywana na ¿yczenie elementom
/// toolbara</summary> /// toolbara</summary>
FTemporary: TBitmap; FTemporary: TBitmap;
FDelayRunTimer: TTimer;
/// <summary>Tablica rectów "uchwytów" zak³adek</summary> /// <summary>Tablica rectów "uchwytów" zak³adek</summary>
FTabRects: array of T2DIntRect; FTabRects: array of T2DIntRect;
@ -152,7 +151,6 @@ type
FOnTabChanging: TSpkTabChangingEvent; FOnTabChanging: TSpkTabChangingEvent;
FOnTabChanged: TNotifyEvent; FOnTabChanged: TNotifyEvent;
procedure DelayRunTimer(Sender: TObject);
protected protected
/// <summary>Instancja obiektu wygl¹du, przechowuj¹cego kolory i czcionki /// <summary>Instancja obiektu wygl¹du, przechowuj¹cego kolory i czcionki
/// u¿ywane podczas renderowania komponentu</summary> /// u¿ywane podczas renderowania komponentu</summary>
@ -514,19 +512,6 @@ begin
FTabIndex := -1; FTabIndex := -1;
Color := clSkyBlue; Color := clSkyBlue;
FDelayRunTimer := TTimer.Create(nil);
FDelayRunTimer.Interval := 36;
FDelayRunTimer.Enabled := False;
FDelayRunTimer.OnTimer := DelayRunTimer;
end;
procedure TSpkToolbar.DelayRunTimer(Sender: TObject);
begin
SetMetricsInvalid;
SetBufferInvalid;
invalidate;
FDelayRunTimer.Enabled := False;
end; end;
procedure TSpkToolbar.DefineProperties(Filer: TFiler); procedure TSpkToolbar.DefineProperties(Filer: TFiler);
@ -549,8 +534,6 @@ begin
FToolbarDispatch.Free; FToolbarDispatch.Free;
FDelayRunTimer.Free;
inherited Destroy; inherited Destroy;
end; end;
@ -1005,8 +988,8 @@ procedure TSpkToolbar.DoOnResize;
begin begin
inherited Height := TOOLBAR_HEIGHT; inherited Height := TOOLBAR_HEIGHT;
FDelayRunTimer.Enabled := False; SetMetricsInvalid;
FDelayRunTimer.Enabled := True; SetBufferInvalid;
if not (FInternalUpdating or FUpdating) then if not (FInternalUpdating or FUpdating) then
invalidate; invalidate;