[Lazarus] New about dialog in 0.9.27 (svn trunk)
Luiz Americo Pereira Camara
luizmed at oi.com.br
Sat Oct 18 15:04:09 CEST 2008
Mattias Gaertner wrote:
> On Sat, 18 Oct 2008 21:47:35 +1100
> "Alexander Klenin" <klenin at gmail.com> wrote:
>
>
>> On Sat, Oct 18, 2008 at 19:49, Graeme Geldenhuys
>> <graemeg.lists at gmail.com> wrote:
>>
>>> I love the new about dialog and the animated information. :-) The
>>> pride and joy of a programmer - creating the about screen. ;-)
>>>
>>> One not so great feature is when you resize the dialog (Lazarus IDE
>>> compiled with GTK2). The mini logo, Close button and page control
>>> tabs flicker like crazy!!
>>>
>> Under win32, logo and page controls do flicker, but Close button does
>> not. Anyway, why is About dialog resizeable at all? The only reason to
>> resize it would be
>> to increase the amount of visible credits, but the the animated area
>> does not grow with the dialog, which looks rather amateurish, if you
>> pardon the expression.
>>
>> So I suggest disable resizing and thus fix both problems at once ;-)
>>
>
> No, that would be a workaround. The controls should not flicker. It's a
> bug somewhere.
The flicker is inherent of TPaintBox (in fact of TGraphicControl). To
avoid it would be necessary to descend of a TWinControl or create a
TPaintBox like derived from TWinControl.
The below code is a workaround to avoid the flicker of a PaintBox inside
a form. It overrides the EraseBackground proc of the form owning the
PaintBox. Works only in win32 since ExcludeClipRect does has effect in
gtk under this situation.
procedure TFormMain.EraseBackground (DC: HDC );
var
ARect: TRect;
begin
//avoid flickering in PaintBox under win32
if DC = 0 then
Exit;
with PaintBoxMain do
ExcludeClipRect(Dc, Left, Top, Left + Width, Top + Height);
ARect := Rect(0, 0, Width,Height);
FillRect(DC, ARect, Brush.Handle);
SelectClipRGN(DC, 0);
end;
Luiz
More information about the Lazarus
mailing list