Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-10

New about dialog in 0.9.27 (svn trunk)

23 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

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!!

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Darius Blaszyk
to Graeme Geldenhuys

I cannot confirm it on Ubuntu 8.04 and GTK2

Darius

Graeme Geldenhuys wrote 21 lines
Hi, 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!! Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Alexander Klenin
to Graeme Geldenhuys: I love the new about dialog and the animated information. :-) The pride and joy of a…
Graeme Geldenhuys wrote 6 lines
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 ;-)

Alexander S. Klenin Insight Experts Ltd.

Reply by email

Mattias Gaertner
to Alexander Klenin
Show quoted text 17 lines
On Sat, Oct 18, 2008 at 19:49, Graeme Geldenhuys 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.
BTW, fixed dialogs are against our design guide lines.

Mattias

Reply by email

Vincent Snijders
to Alexander Klenin: On Sat, Oct 18, 2008 at 19:49, Graeme Geldenhuys Under win32, logo and page controls do…
Alexander Klenin wrote 15 lines
On Sat, Oct 18, 2008 at 19:49, Graeme Geldenhuys 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.

I guess your lazarus version is not completely updated: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=17035

Vincent

Reply by email

Alexander Klenin
to Darius Blaszyk
Darius Blaszyk wrote
> 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. This was fixed in r17035

I see. Sorry about the noise.
My internet connection is not fast enough to follow Lazarus development speed ;-)

The flicker I cannot reproduce myself, not even on windows.

It is more or less known issue, even in Delphi.
It is caused by the fact that Windows (and possibly GTK as well, judging by the existence of the same issue there)
sends WM_ERASEBKGND message before WM_PAINT message and (sometimes) displays the control in the state between messages. To solve this, Delphi has introduced DoubleBuffered(?) form property. To check this issue, you can use attached (debug-only!) patch which disables background erasing for AboutFrm. You can see that TImage with mini-logo stops flickering
and the flicker of page control is reduced (because the control itself still processes WM_ERASEBKGND).
Of course, this comes at a price of "transparent" form, so it is not a proper solution.

Alexander S. Klenin Insight Experts Ltd. -------------- next part -------------- A non-text attachment was scrubbed... Name: ide_aboutform_noflicker.patch Type: application/octet-stream Size: 990 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081018/c10b59ed/attachment.obj

Reply by email

Luiz Americo Pereira Camara
to Mattias Gaertner: On Sat, 18 Oct 2008 21:47:35 +1100 No, that would be a workaround. The controls should…
Mattias Gaertner wrote 26 lines
On Sat, 18 Oct 2008 21:47:35 +1100 "Alexander Klenin" wrote: > On Sat, Oct 18, 2008 at 19:49, Graeme Geldenhuys > 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

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Sat, 18 Oct 2008 21:47:35 +1100 No, that would be a workaround. The controls should…
Mattias Gaertner wrote 5 lines
> > 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.

Correct.

BTW, fixed dialogs are against our design guide lines.

That is good to hear. There is nothing worse than adjusting your DPI setting or Font, and then half the text aren't visible and you cannot resize the form. Good decision Mattias! :-)

Example:
I have a Vodafone 3G modem that came with dialup software (control panel thingy). On my laptop under Windows I run at 1920x1200 so have to use DPI of 120-130 read decently. With the 3G software, most of the dialogs are useless and the text and buttons etc are off screen and I can't resize the dialogs!! Idiots!

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Darius Blaszyk: I cannot confirm it on Ubuntu 8.04 and GTK2 Darius
Darius Blaszyk wrote
I cannot confirm it on Ubuntu 8.04 and GTK2 Darius

Hi Darius. I created a mantis bug report for this. I also uploaded a small 10sec video (600kb) to show the problem. You can see all the labels for version information, Close button and Page Control tabs flicker a lot.

http://bugs.freepascal.org/view.php?id=12433

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Alexander Klenin
to Darius Blaszyk: This was fixed in r17035 The flicker I cannot reproduce myself, not even on windows.…
Darius Blaszyk wrote
> 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. This was fixed in r17035

By the way, this fix is not correct at least on Windows. It works only when the active page is "Contributors". It seems that otherwise ContribitorsPaintBox dimensions are not updated before FormResize event.

So, the correct fix would be to place FBuffer.Width/Height := ACanvas.Width/Height
directly into DrawScrollText procedure.
Sorry, no patch since SVN is not suited for managing patch queues, and I already have working copy modified with my previous patch.

Alexander S. Klenin Insight Experts Ltd.

Reply by email

Graeme Geldenhuys
to Alexander Klenin
Alexander Klenin wrote 9 lines
On Sat, Oct 18, 2008 at 22:50, Darius Blaszyk wrote: >> 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. > This was fixed in r17035 By the way, this fix is not correct at least on Windows. It works only when the active page is "Contributors". It seems that otherwise ContribitorsPaintBox dimensions are not updated before FormResize event.

Yup, same problem under GTK2. Resize the dialog while text is scrolling in Contributors tab. After the name Barts Broersma, the text stops appearing, until that name reaches the middle of the tab, then the other names start poping up, but don't scroll from the bottom of the screen.

See attached screenshot.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: about.png
Type: image/png
Size: 18730 bytes
Desc: not available
Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081018/5ddf82fc/attachment-0001.png

Reply by email

Luiz Americo Pereira Camara
to Luiz Americo Pereira Camara: The flicker is inherent of TPaintBox (in fact of TGraphicControl). To avoid it would be…
Luiz Americo Pereira Camara wrote 9 lines
Mattias Gaertner wrote: > 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.

I changed TPaintBox to descend from TCustomControl and created a empty WMEraseBkgnd handler and the flicker is gone, at least on win32

Luiz

Reply by email

Graeme Geldenhuys
to Bee
I don't see any animated information on Lazarus' about dialog. :-P I'm on Mac Leopard using latest FPC and Lazarus' SVN trunk. ;)

Strange? What does your Contributors tab look like? Before the text used to be in a memo and left aligned. Now it's a PaintBox, centre aligned text and scrolling upwards.

I don't know the exact revision the animation was introduced, but here I have v0.9.27 r17029 i386-linux-gtk 2 (beta) and I can see the animation.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Bee
to Graeme Geldenhuys
Strange? What does your Contributors tab look like? Before the text used to be in a memo and left aligned. Now it's a PaintBox, centre aligned text and scrolling upwards.

Just an empty space. No text, no scrolling, no animation. :-D

I don't know the exact revision the animation was introduced, but here I have v0.9.27 r17029 i386-linux-gtk 2 (beta) and I can see the animation.

I got rev.17054 i386-mac-carbon. Should I file a bug report? ;)

-Bee-

Reply by email

John Stoneham
to Bee: Just an empty space. No text, no scrolling, no animation. :-D I got rev.17054…
Bee wrote 6 lines
> Strange? What does your Contributors tab look like? Before the text > used to be in a memo and left aligned. Now it's a PaintBox, centre > aligned text and scrolling upwards. Just an empty space. No text, no scrolling, no animation. :-D

Same here. Contributors and Acknowledgements are both just blank. Contributors.txt and acknowledgements.txt are both in the docs folder.

Show quoted text 7 lines
> I don't know the exact revision the animation was introduced, but here > I have v0.9.27 r17029 i386-linux-gtk 2 (beta) and I can see the > animation. I got rev.17054 i386-mac-carbon. Should I file a bug report? ;)

Same svn rev here too. And yes, file a bug report.

_| ( ) |-| |\| -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081020/efbc5bcc/attachment.html

Reply by email

Benito van der Zander

Hi,
in the current trunk the doublebuffer bitmap (?), is not always resized with the form,
so sometimes the text scrolls only in a part of the window. And you could center the big Lazarus logo.

Benito

Reply by email

Darius Blaszyk
to Graeme Geldenhuys

This has been fixed in r17088. Graeme, can you send me the URL of the bugreport? I recall you mentioning this issue on the ML, but I cannot find the bugreport in the tracker. If it exists then I want to close it.

Darius

Graeme Geldenhuys wrote 20 lines
On Tue, Oct 21, 2008 at 12:08 AM, Benito van der Zander wrote: > in the current trunk the doublebuffer bitmap (?), is not always resized > with the form, > so sometimes the text scrolls only in a part of the window. I've already submitted a bug report for this. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

wile64
to Darius Blaszyk

2008/10/21 Darius Blaszyk

This has been fixed in r17088. Graeme, can you send me the URL of the bugreport? I recall you mentioning this issue on the ML, but I cannot find the bugreport in the tracker. If it exists then I want to close it.

New bug, when you see scrolling and close dialog have error msg "acces violation"

And the scrolling don't start on bottom :(

regards

Laurent. "If debugging is the art of removing bugs, then programming must be the art of creating!" My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081022/2ec1d828/attachment.html

Reply by email

Graeme Geldenhuys
to Darius Blaszyk: This has been fixed in r17088. Graeme, can you send me the URL of the bugreport? I recall…
Darius Blaszyk wrote
This has been fixed in r17088. Graeme, can you send me the URL of the bugreport? I recall you mentioning this issue on the ML, but I cannot find the bugreport in the tracker. If it exists then I want to close it.

My mistake Darius... I thought I filed a bug report, but instead posted a screenshot to the ML showing the issue. Below is the message I responded to:

----------------------

Alexander Klenin wrote
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.

This was fixed in r17035
-----------------------

I'll get a svn update and retest. I'm not at r17088 yet.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email