Sign in Join

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

Mailing lists / lazarus / 2015-10

"Checkbox for Booleans" in Object Inspector now used as default

9 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Juha Manninen

r49914 makes the Checkbox in OI the default as a Boolean editor. If you still want the old Combobox, please change it in options dialog.

The themed Checkbox which has been tested for a while using a define, is now the default control for this purpose.
The "normal" Checkbox provided by widgetset can still be used with define UseOINormalCheckBox.

Please test.

Regards,
Juha

Reply by email

Anthony Walter
to Juha Manninen

The checkbox option seems to be working for me on ubuntu gtk2 lazarus.

Capture:

http://cache.getlazarus.org/video/inspector.mp4

One thing I've noticed about gtk versions of the inspector is the lagginess of the inspector when mouse dragging with the left button pressed. It would seem that with each inspector property change (ie. changing which property is being edited) leads a significant delay (a few hundred milliseconds) caused by hiding->moving->showing the inplace editor many times a second.

This could be lagginess could be eliminated entirely by not attempting to show the inplace editor until after a timer has expired. For example, detect that the last inplace editor was created 100 milliseconds ago, so don't try to show the next inplace editor. Rather wait for 200ms after the a previous inplace editor was selected before showing the next inplace editor. If a new property was selected before the 200ms, then reset the timer to 0 and start it again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151002/8d59a383/attachment.html>

Reply by email

Juha Manninen
to Anthony Walter
Anthony Walter wrote 5 lines
One thing I've noticed about gtk versions of the inspector is the lagginess of the inspector when mouse dragging with the left button pressed. It would seem that with each inspector property change (ie. changing which property is being edited) leads a significant delay (a few hundred milliseconds) caused by hiding->moving->showing the inplace editor many times a second.

Maybe the delay is hundreds of milliseconds in a slow machine. Here it is much less.
I tried to find a situation where this delay would slow down my work-flow. There is no such situation. I can move the mouse as quickly as I want. Update of some intermediate properties is skipped but it does not matter.
Finally when I stop the mouse, editor of the selected property gets updated. How could it work better?

Creation of property editor controls is already optimized. There is only one control of each type, namely Edit, Combobox and Checkbox. Only their position and visibility are changed.

Show quoted text 7 lines
This could be lagginess could be eliminated entirely by not attempting to show the inplace editor until after a timer has expired. For example, detect that the last inplace editor was created 100 milliseconds ago, so don't try to show the next inplace editor. Rather wait for 200ms after the a previous inplace editor was selected before showing the next inplace editor. If a new property was selected before the 200ms, then reset the timer to 0 and start it again.

Ok, it could be optimized more although I don't see any big need for it. If you come up with a patch without negative side-effects then I think it can be applied.

Regards,
Juha

Reply by email

Juha Manninen
to Anthony Walter: The checkbox option seems to be working for me on ubuntu gtk2 lazarus. Capture:…
Anthony Walter wrote
One thing I've noticed about gtk versions of the inspector is the lagginess of the inspector when mouse dragging with the left button pressed.

Maybe the editors should be updated only with MouseUp event. It is interesting that the properties are now updated with mouse drag. I don't remember which events are used for it but it could be changed. A timer for this purpose feels like a hack. I believe it can be handled with proper events.

Juha

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 9 lines
On Sat, Oct 3, 2015 at 2:57 AM, Anthony Walter wrote: > One thing I've noticed about gtk versions of the inspector is the lagginess > of the inspector when mouse dragging with the left button pressed. Maybe the editors should be updated only with MouseUp event. It is interesting that the properties are now updated with mouse drag. I don't remember which events are used for it but it could be changed. A timer for this purpose feels like a hack. I believe it can be handled with proper events.

As soon as the property-changed event comes the OI should clean up or invalidate references. The painting, creation, update of the controls can be delayed for example with OnIdle.

Mattias

Reply by email

Anthony Walter
to Mattias Gaertner

You what would help:

If the object inspector code could be detached from the IDE. That is, if it was easy to write a stand alone program and drop in a TObjectInspector component, if only to make it easy to add improvements.

As it stands right now, I believe it's pretty much impossible separate the object inspector source code from the IDE source code. Please correct me if I am wrong in this matter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151005/689c3bd0/attachment.html>

Reply by email

Juha Manninen
to Anthony Walter
Anthony Walter wrote 5 lines
As it stands right now, I believe it's pretty much impossible separate the object inspector source code from the IDE source code. Please correct me if I am wrong in this matter.

Yes you are wrong. Object Inspector is part of IdeIntf package.

Regards,
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151006/2fba84ab/attachment-0001.html>

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 8 lines
On Tuesday, October 6, 2015, Anthony Walter wrote: > > As it stands right now, I believe it's pretty much impossible separate the > object inspector source code from the IDE source code. Please correct me if > I am wrong in this matter. > Yes you are wrong. Object Inspector is part of IdeIntf package.

And there is an example how to use it in your own programs in

lazarus/examples/objectinspector/oiexample.lpi

It was a bit outdated though. I updated it now.

Mattias

Reply by email