Recent

Author Topic: Lazarus Release Candidate 2 of 1.4  (Read 83145 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Lazarus Release Candidate 2 of 1.4
« Reply #60 on: March 19, 2015, 09:47:15 pm »
GTK 2 StatusBar Owner draw not working properly:

When I compile my app to use GTK2 the status bar looks messed up like it's writing the
plain text as well.  See Attachment.

This is on latest RC on Linux 64bit

It does not happen on QT or windows widget sets.

Without code which paints in owner draw nobody can help you here.

Verified it's only on GTK2

procedure TMainForm.MainStatusBarDrawPanel(StatusBar: TStatusBar;
 Panel: TStatusPanel; const Rect: TRect);
var
   image_index:integer;
begin
     with statusbar.Canvas do
          case panel.Index of
              0:begin
                      image_index:=48;
                      Font.Style := [fsBold];
                end;
               2: begin
                   image_index:=49;
                   Font.Style := [fsBold];
               end;
              4:begin
                     image_index:=50;
                     Font.Style := [fsBold];
                end;
           end;
     maindatamod.MenuImages.Draw(StatusBar.Canvas, Rect.Left, Rect.Top,image_index) ;
     TextRect(Rect,2 + maindatamod.MenuImages.Width + Rect.Left, 2 + Rect.Top,Panel.Text) ;
end;
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 206
    • http://www.lazarus.freepascal.org
Re: Lazarus Release Candidate 2 of 1.4
« Reply #61 on: March 19, 2015, 10:52:25 pm »
Please create a bug report.

zeljko

  • Hero Member
  • *****
  • Posts: 1821
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus Release Candidate 2 of 1.4
« Reply #62 on: March 20, 2015, 08:23:54 am »
GTK 2 StatusBar Owner draw not working properly:

When I compile my app to use GTK2 the status bar looks messed up like it's writing the
plain text as well.  See Attachment.

This is on latest RC on Linux 64bit

It does not happen on QT or windows widget sets.

Without code which paints in owner draw nobody can help you here.

Verified it's only on GTK2

procedure TMainForm.MainStatusBarDrawPanel(StatusBar: TStatusBar;
 Panel: TStatusPanel; const Rect: TRect);
var
   image_index:integer;
begin
     with statusbar.Canvas do
          case panel.Index of
              0:begin
                      image_index:=48;
                      Font.Style := [fsBold];
                end;
               2: begin
                   image_index:=49;
                   Font.Style := [fsBold];
               end;
              4:begin
                     image_index:=50;
                     Font.Style := [fsBold];
                end;
           end;
     maindatamod.MenuImages.Draw(StatusBar.Canvas, Rect.Left, Rect.Top,image_index) ;
     TextRect(Rect,2 + maindatamod.MenuImages.Width + Rect.Left, 2 + Rect.Top,Panel.Text) ;
end;

Have you tried FillRect() before maindatamod.MenuImages.Draw(). Gtk2 status bar is transparent,so that's why you have problem.

Headless

  • Newbie
  • Posts: 2
Re: Lazarus Release Candidate 2 of 1.4
« Reply #63 on: March 20, 2015, 04:01:22 pm »

Quote from: Headless on March 19, 2015, 06:13:41 pm

    Is it correct that Lazarus 1.2.6 is not upwards compatible with Lazarus 1.4?
    If I make a project with 1.4 (just a simple form with 1 button), I can not open it with 1.2.6.


Not true. Besides, you can test it easily yourself if you want.

Hi JuhaManninen,

Thank you for your answer.
Of course I tested it before posting my question, obviously you didn't before answering it.
Again, under Linux Mint 13.4 (32 bit), Lazarus1.2.6 is NOT upwards compatible with Lazarus1.4RC (either 1 or 2).
If I save a project with 1.4 (a simple form with 1 button) and open it with 1.2.6 I see no form and the objectinspector is empty (wich is logic if there is no object like the form). If I compile and run it however, to my surprise it runs.
Lazarus1.4RC is otherwise downwards compatible with Lazarus1.2.6. If I save a project with 1.2.6 (again a form with 1 button), and open it with 1.4, everything works fine. But as soon as I change something (add another button) and save it, it can not be opened with 1.2.6 anymore (same result as above).
I also tested this with complete new standard installations of 1.2.6, 1.4RC1 and 1.4RC2.
I therefore strongly advise everyone not to use 1.4 in a production environment, because if there are problems you can't go back to 1.2.6, at least not in Mint 13.4.

Best regards.

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 206
    • http://www.lazarus.freepascal.org
Re: Lazarus Release Candidate 2 of 1.4
« Reply #64 on: March 20, 2015, 04:08:13 pm »
Lazarus was always only downwards compatible. That means it can open old projects, but old IDEs might misunderstand projects created by newer IDEs.
In case of your "I see no form" it might be this incompatibility:
http://wiki.lazarus.freepascal.org/Lazarus_1.4.0_release_notes#Old_IDE_does_not_reopen_first_file_when_opening_a_project

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4660
  • I like bugs.
Re: Lazarus Release Candidate 2 of 1.4
« Reply #65 on: March 20, 2015, 05:02:45 pm »
I therefore strongly advise everyone not to use 1.4 in a production environment, because if there are problems you can't go back to 1.2.6, at least not in Mint 13.4.

Ok, you confused "opening a project" with "opening a unit in editor".
If for some reason you must go back to 1.2.6 then you can open Unit1.pas (or similar) explicitly in editor.
This is quite an irrelevant problem.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Lazarus Release Candidate 2 of 1.4
« Reply #66 on: March 23, 2015, 04:40:16 pm »

     maindatamod.MenuImages.Draw(StatusBar.Canvas, Rect.Left, Rect.Top,image_index) ;
     TextRect(Rect,2 + maindatamod.MenuImages.Width + Rect.Left, 2 + Rect.Top,Panel.Text) ;
end;

Have you tried FillRect() before maindatamod.MenuImages.Draw(). Gtk2 status bar is transparent,so that's why you have problem.
[/quote]

No, I didn't know the GTK status bar is Transparent.  Will look into trying that and post results.

UPDATE:  fillrect worked, only issue is I can't seem to match the color to the non owner drawn panels.  What I did was just use cllightgrey and that looks pretty good.   I tried the color of the parent form, but it still didn't match.

Thanks
« Last Edit: March 23, 2015, 05:10:26 pm by snorkel »
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

zeljko

  • Hero Member
  • *****
  • Posts: 1821
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus Release Candidate 2 of 1.4
« Reply #67 on: March 23, 2015, 08:57:00 pm »

     maindatamod.MenuImages.Draw(StatusBar.Canvas, Rect.Left, Rect.Top,image_index) ;
     TextRect(Rect,2 + maindatamod.MenuImages.Width + Rect.Left, 2 + Rect.Top,Panel.Text) ;
end;

Have you tried FillRect() before maindatamod.MenuImages.Draw(). Gtk2 status bar is transparent,so that's why you have problem.

No, I didn't know the GTK status bar is Transparent.  Will look into trying that and post results.

UPDATE:  fillrect worked, only issue is I can't seem to match the color to the non owner drawn panels.  What I did was just use cllightgrey and that looks pretty good.   I tried the color of the parent form, but it still didn't match.

Thanks
[/quote]

FillRect is just workaround for your RC2, it was bug in Gtk2 since it painted panel text + your paint.
Maybe better would be to set Panels.Text to '' and then paint whatever in owner draw method, and it will be ok until 1.4 or RC3 is out when you'll have this fixed.

bylaardt

  • Sr. Member
  • ****
  • Posts: 310
Re: Lazarus Release Candidate 2 of 1.4
« Reply #68 on: March 25, 2015, 09:05:43 pm »
This error occurs only when i cross-compile on linux to win64-x86_64.

Code: [Select]
Compiling package cairocanvas_pkg 0.0: Exit code 1, Errors: 1, Warnings: 1
Warning: Recompiling pangocairo, checksum changed for Cairo
cairocanvas.pas(19,11) Fatal: Cannot find unit pangocairo used by CairoCanvas. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/usr/lib/fpc/2.6.4/units/x86_64-linux/gtk2/pangocairo.ppu..
Compiling package LazControls 1.0.1: Aborted
Compiling package SynEdit 1.0: Aborted

it works when i downgraded to RC-1.
crosscompile to win32-i386 works like a charm
« Last Edit: April 07, 2015, 02:02:10 am by bylaardt »

dziesig

  • Newbie
  • Posts: 2
Re: Lazarus Release Candidate 2 of 1.4
« Reply #69 on: March 26, 2015, 11:49:55 pm »
I just downloaded the .deb files for 1.4RC2 and installed them over my existing 1.2.6 version.  When I went to start Lazarus using startlazarus it brought up "Welcome to Lazarus 1.2.6" with the Lazarus directory field still pointing to /usr/share/lazarus/1.2.6/ and the message "Error: directory not found".  I changed this to /usr/share/lazarus/1.4RC2/ and the message changed to "Warning: wrong version in ide/version.inc: 1.4RC2".

I ignored the warning and pressed "Start IDE".  This produced a message dialog saying "Without a proper Lazarus directory you will get a lot of warnings."

I will stop here until I make sure that I have eliminated all vestiges of 1.2.6 from my personal directory (I can't find anything but 1.4RC2 in the rest of the filesystem).

I will post the results of that process when I get done.

dziesig

  • Newbie
  • Posts: 2
Re: Lazarus Release Candidate 2 of 1.4
« Reply #70 on: March 27, 2015, 12:22:22 am »
I renamed my ~/.lazarus directory, re-started the IDE, and accepted the warning about getting many warnings.  I got a few warnings, mostly about it not being able to find some of my private components, then everything went away (no messages about being finished, etc.).  I checked "top" to be sure it was done and re-started Lazarus.  This time I got "Welcome to Lazarus 1.4RC2" with no errors so I started the IDE and it had installed correctly.  I installed the first batch of my private components and they all seem to work.

I will post the results of my later work as it is completed.

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazarus Release Candidate 2 of 1.4
« Reply #71 on: March 27, 2015, 09:14:17 am »
There is a bug with SynEdit auto indent:

Create the following text in the ide:

Code: [Select]
        line1
       line2

Now place the caret at the end of line2 and press enter to create a new line.
And now try to delete the just create line with backpspace: You are not able to as
the caret toggles between the startpositions of line1 and line2.

Pascal

Windows 8.1 x64, 1.4RC2
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Eugene Loza

  • Hero Member
  • *****
  • Posts: 729
    • My games in Pascal
Re: Lazarus Release Candidate 2 of 1.4
« Reply #72 on: March 27, 2015, 09:49:16 am »
Yesterday installed Lazarus 1.4 RC2 32 bit at Windows 7 64 bit. Old version (1.4 RC1) removed clean and 'user preferences deleted' at install.
When editing options got the attached error at Editor>Display
My FOSS games in FreePascal&CastleGameEngine: https://decoherence.itch.io/ (Sources: https://gitlab.com/EugeneLoza)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Lazarus Release Candidate 2 of 1.4
« Reply #73 on: March 27, 2015, 09:59:06 am »
I can confirm the error it is persistent happens every time you select the display option.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Lazarus Release Candidate 2 of 1.4
« Reply #74 on: March 27, 2015, 03:31:44 pm »
TeditButton.borderstyle is attached to the container. If this is by design then you should add an EditBorderstyle property too so we can turn of the editor border and on the containers for a more. I'll create a bug report too later today.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018