Sign in Join

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

Mailing lists / lazarus / 2003-11

New Bug Entered

21 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Unknown author

Title: IDE: SnapToGrid BugFix

Entered by: Claude Rieth

To obtain REAL snap to grid and not only modulo gridsize function, the following patch needs to be applied (gives behaviour similar to delphi)

controlselection.pp

function ...FindNearestSnapRight
.
.
FindNearestGridX(NearestRight);
//add the following
if NearestRight.Valid then
  NearestRight.Nearest:=NearestRight.Nearest+1;
//end add
function ...FindNearestSnapBottom
.
.
FindNearestGridY(NearestBottom);
//add the following
if NearestBottom.Valid then
  NearestBottom.Nearest:=NearestBottom.Nearest+1;
//end add

Reply by email

Unknown author

Title: Can not run compiled app from lazarus env.

Entered by: Mi.Chal.

When I build my application from lazarus and try to run it, message

\"No program file \'d:\\....\\project1\'\" found\"

path is correct.

Reply by email

Unknown author

Title: LCL: Bug+Fix, GTK drawing not accurate

Entered by: Claude Rieth

As I am a PixelCounter (ErbsenZaehler in German), I found/fixed some bugs, mostly related to incorrect calculations of Right and Width, Bottom and Height.

gtkwinapi.inc

procedure ...Framed3d
..
gtk_paint_shadow(....Arect.Right-Arect.Left+1, //add 1 Arect.Bottom-Arect.Top+1

procedure ...DrawFrameControl

same problem on 3 or 4 places

Fixing this gives much cleaner user interfaces and consistent behaviour, ie

Width:=Right-Left+1;
Height:=Bottom-Top+1;

Reply by email

Unknown author

Title: Dialog boxes locks up windows manager or freezes

Entered by: George Patterson

OS: FreeBSD 5.0 patch 7
Lazarus Version: latest CVS (0.9.0 beta)

This is my first bug report..so bear with me.

every other time, clicking on a button on a dialog box (such as save or project open, will freeze lazarus. Fluxbox will run away consuming all the processor, while under fvwm lazarus will freeze and be nonresponsive.

I tried truss (aka strace under linux) but that didn\'t reveal much.

Reply by email

Unknown author

Title: SpeedButton doesn\'t display bitmap

Entered by: Eric Chapman

When I load a glyph onto a speedbutton it shows in the design environment but not when the project is running. All that shows is a coloured background. I am using bitmaps taken from a Kylix installation.

Reply by email

Unknown author

Title: LCL: TControl GetClientRect, GetClientWidth, GetCLientHeight

Entered by: Claude Rieth

In TControl (control.inc)

GetClientRect returns Right and Bottom as Width and Height, it should be Width-1 and Height-1

GetClientWidth returns Right, should be Right+1
GetClientHeight return Bottom, should be Bottom+1

TWinControl.GetClientRect has the same problem,

Correcting this automagically fixes different glitches in the UI

Reply by email

Unknown author

Title: text in Configure Build Lazarus dialog written on black background

Entered by: Vincent Snijders

The text in the (owner draw) listbox in the Configure Build Lazarus dialiog is inreadable. It is written with black letters on a black background.

Tested on Redhat 8.0 and KDE desktop. If I start the Gnome desktop on the same computer (RH 8.0 as well) I don\'t have this problem and the dialog is readable (as designed).

Reply by email

Unknown author

Title: Error Renaming component

Entered by: Jesus Reyes A.

FPC1.9.1(2003/11/08), lazarus(cvs today)
Renaming a button eg. button1->btnExit cause a error box: \"Unable to rename a variable in source. see messages.\", in messages window I can read: \"TButton expected, but TBUTTON found\"

Reply by email

Andrew Higgs
to Unknown author: Title: Dialog boxes locks up windows manager or freezes Entered by: George Patterson OS:…

This does not seem to happen with OpenBox3 but does with OpenBox2.X, Fluxbox, BlackBox.

Someone (I think it was Andrew Johson) said it may have something to do with NETWM support. Not sure

Something else to try is to open 'Enviroment' | 'Debugger Options'. This solves the problem for that instaance of Lazarus under OpenBox 2.X.

HTH

Kind regards
ANdrew Higgs

Show quoted text 19 lines
Title: Dialog boxes locks up windows manager or freezes Entered by: George Patterson OS: FreeBSD 5.0 patch 7 Lazarus Version: latest CVS (0.9.0 beta) This is my first bug report..so bear with me. every other time, clicking on a button on a dialog box (such as save or project open, will freeze lazarus. Fluxbox will run away consuming all the processor, while under fvwm lazarus will freeze and be nonresponsive. I tried truss (aka strace under linux) but that didn\'t reveal much. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Micha Nelissen
to Unknown author: Title: LCL: TControl GetClientRect, GetClientWidth, GetCLientHeight Entered by: Claude…
Mattias Gaertner wrote 19 lines
On Fri, 7 Nov 2003 02:50:56 -0500 (EST) wrote: >Title: LCL: TControl GetClientRect, GetClientWidth, GetCLientHeight > >Entered by: Claude Rieth > >In TControl (control.inc) > >GetClientRect returns Right and Bottom as Width and Height, it should be >Width-1 and Height-1 > >GetClientWidth returns Right, should be Right+1 >GetClientHeight return Bottom, should be Bottom+1 > >TWinControl.GetClientRect has the same problem, Can someone check this under Delphi?

From Delphi help:

"GetClientRect is the protected implementation of the ClientRect property. GetClientRect returns a rectangle with the rectangle�s Top and Left fields set to zero, and its Bottom and Right fields set to the control's ClientHeight and ClientWidth, respectively."

Implementation is according to specification.

I think the bug poster is looking at a different problem.

Micha.

Reply by email

Mattias Gaertner
to Unknown author: Title: IDE: SnapToGrid BugFix Entered by: Claude Rieth To obtain REAL snap to grid and…
Show quoted text 17 lines
Title: IDE: SnapToGrid BugFix Entered by: Claude Rieth To obtain REAL snap to grid and not only modulo gridsize function, the following patch needs to be applied (gives behaviour similar to delphi) controlselection.pp function ...FindNearestSnapRight . . FindNearestGridX(NearestRight); //add the following if NearestRight.Valid then NearestRight.Nearest:=NearestRight.Nearest+1;

The snapping seems to work correct. The grid leftmost, topmost pixel is painted at 0,0 and the grid snaps to 0,0.

What does Delphi do?

Mattias

Show quoted text 19 lines
//end add function ...FindNearestSnapBottom . . FindNearestGridY(NearestBottom); //add the following if NearestBottom.Valid then NearestBottom.Nearest:=NearestBottom.Nearest+1; //end add _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Micha Nelissen
to Unknown author: Title: IDE: SnapToGrid BugFix Entered by: Claude Rieth To obtain REAL snap to grid and…
Mattias Gaertner wrote 28 lines
On Sun, 9 Nov 2003 07:31:17 -0500 (EST) wrote: >Title: IDE: SnapToGrid BugFix > >Entered by: Claude Rieth > >To obtain REAL snap to grid and not only modulo gridsize function, the >following patch needs to be applied (gives behaviour similar to delphi) > >controlselection.pp > >function ...FindNearestSnapRight >. >. >FindNearestGridX(NearestRight); >//add the following >if NearestRight.Valid then > NearestRight.Nearest:=NearestRight.Nearest+1; The snapping seems to work correct. The grid leftmost, topmost pixel is painted at 0,0 and the grid snaps to 0,0. What does Delphi do? Mattias

Left,top snaps to 0,0 too. The width, height do 'snap' to ((mod gridsize) + 1). I don't know the reasoning for that, though, I always have found it odd, because then you can't place buttons side by side easily: they overlap with 1 pixel by default.

Micha.

Reply by email

Mattias Gaertner
to Unknown author: Title: LCL: Bug+Fix, GTK drawing not accurate Entered by: Claude Rieth As I am a…
Show quoted text 23 lines
Title: LCL: Bug+Fix, GTK drawing not accurate Entered by: Claude Rieth As I am a PixelCounter (ErbsenZaehler in German), I found/fixed some bugs, mostly related to incorrect calculations of Right and Width, Bottom and Height. gtkwinapi.inc procedure ...Framed3d .. gtk_paint_shadow(....Arect.Right-Arect.Left+1, //add 1 Arect.Bottom-Arect.Top+1 procedure ...DrawFrameControl same problem on 3 or 4 places Fixing this gives much cleaner user interfaces and consistent behaviour, ie

Consistent with what?

Mattias

Reply by email

Mattias Gaertner
to Unknown author: Title: LCL: TControl GetClientRect, GetClientWidth, GetCLientHeight Entered by: Claude…
Show quoted text 14 lines
Title: LCL: TControl GetClientRect, GetClientWidth, GetCLientHeight Entered by: Claude Rieth In TControl (control.inc) GetClientRect returns Right and Bottom as Width and Height, it should be Width-1 and Height-1 GetClientWidth returns Right, should be Right+1 GetClientHeight return Bottom, should be Bottom+1 TWinControl.GetClientRect has the same problem,

Can someone check this under Delphi?

Correcting this automagically fixes different glitches in the UI

What glitches?

Mattias

Reply by email

Mattias Gaertner
to Claude Rieth: Maybe add it as an option in settings, Grid ? Claude
Show quoted text 11 lines
23/11/03 14:06:25, Micha Nelissen wrote: >Left,top snaps to 0,0 too. The width, height do 'snap' to ((mod >gridsize) + 1). I don't know the reasoning for that, though, I always >have found it odd, because then you can't place buttons side by side >easily: they overlap with 1 pixel by default. > >Micha. > Maybe add it as an option in settings, Grid ?

How should we call the option?

Mattias

Reply by email

Claude Rieth
Micha Nelissen wrote 38 lines
Mattias Gaertner wrote: > On Sun, 9 Nov 2003 07:31:17 -0500 (EST) wrote: > > >>Title: IDE: SnapToGrid BugFix >> >>Entered by: Claude Rieth >> >>To obtain REAL snap to grid and not only modulo gridsize function, the >>following patch needs to be applied (gives behaviour similar to delphi) >> >>controlselection.pp >> >>function ...FindNearestSnapRight >>. >>. >>FindNearestGridX(NearestRight); >>//add the following >>if NearestRight.Valid then >> NearestRight.Nearest:=NearestRight.Nearest+1; > > > The snapping seems to work correct. The grid leftmost, topmost pixel is > painted at 0,0 and the grid snaps to 0,0. > > What does Delphi do? > > > Mattias Left,top snaps to 0,0 too. The width, height do 'snap' to ((mod gridsize) + 1). I don't know the reasoning for that, though, I always have found it odd, because then you can't place buttons side by side easily: they overlap with 1 pixel by default. Micha.

Maybe add it as an option in settings, Grid ?

Regards,
Claude

Show quoted text 6 lines
_________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Claude Rieth

Hi,

sorry guys, I didnt check the exact delphi behaviour on this, you're right that i was wrong.

I'll check better next time befor submitting anything.

Regards,
Claude

Micha Nelissen wrote 42 lines
Mattias Gaertner wrote: > On Fri, 7 Nov 2003 02:50:56 -0500 (EST) wrote: > > >>Title: LCL: TControl GetClientRect, GetClientWidth, GetCLientHeight >> >>Entered by: Claude Rieth >> >>In TControl (control.inc) >> >>GetClientRect returns Right and Bottom as Width and Height, it should be >>Width-1 and Height-1 >> >>GetClientWidth returns Right, should be Right+1 >>GetClientHeight return Bottom, should be Bottom+1 >> >>TWinControl.GetClientRect has the same problem, > > > Can someone check this under Delphi? From Delphi help: "GetClientRect is the protected implementation of the ClientRect property. GetClientRect returns a rectangle with the rectangle�s Top and Left fields set to zero, and its Bottom and Right fields set to the control's ClientHeight and ClientWidth, respectively." Implementation is according to specification. I think the bug poster is looking at a different problem. Micha. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Mattias Gaertner
to Claude Rieth: Maybe add it as an option in settings, Grid ? Claude
Show quoted text 20 lines
On Tue, 2003-11-25 at 08:59, Mattias Gaertner wrote: > On Sun, 23 Nov 2003 18:57:27 +0100 Claude Rieth > wrote: > > > 23/11/03 14:06:25, Micha Nelissen wrote: > > > > >Left,top snaps to 0,0 too. The width, height do 'snap' to ((mod > > >gridsize) + 1). I don't know the reasoning for that, though, I always > > > > > >have found it odd, because then you can't place buttons side by side > > >easily: they overlap with 1 pixel by default. > > > > > >Micha. > > > > > > > Maybe add it as an option in settings, Grid ? > > How should we call the option? DelphiLikeSnapping ?

I think, this is ambigious. Delphi does not have guide lines. So, "Delphi Snapping" can also be interpreted as
- deactivate Guide Lines
- add 1 to Right and Bottom grid snapping
- hide grid in client areas of child controls
- .. deactivate/hide any further snapping extensions not in Delphi

Mattias

Reply by email

Claude Rieth
to Claude Rieth: Maybe add it as an option in settings, Grid ? Claude
Mattias Gaertner wrote 16 lines
On Sun, 23 Nov 2003 18:57:27 +0100 Claude Rieth wrote: > 23/11/03 14:06:25, Micha Nelissen wrote: > > >Left,top snaps to 0,0 too. The width, height do 'snap' to ((mod > >gridsize) + 1). I don't know the reasoning for that, though, I always > >have found it odd, because then you can't place buttons side by side > >easily: they overlap with 1 pixel by default. > > > >Micha. > > > > Maybe add it as an option in settings, Grid ? How should we call the option?

DelphiLikeSnapping ?

Regards,

Claude

Reply by email