Re: [Lazarus] PBear and Gecko SDK components in Lazarus..
On Fri, 27 Feb 2009, domini...@savagesoftware.com.au wrote: Hi all, From reading this thread... http://forum.lazarus.freepascal.org/index.php/topic,6158.15.html It seems that Phil had done some work in getting PBear working with Lazarus. Does anyone know who Phil is, and if this is now available from SVN? I am interested in both PBear and GeckoSDK working with Lazarus apps, particularly on Windows and Mac OS X. Currently I have an application which uses PBear with Delphi on Windows and it works really well. Having it work on Mac OS X with Lazarus/FreePascal would be the easiest porting route, but I'm willing to consider GeckoSDK as an alternative just to ensure cross-platform browser support. I tried GeckoSDK once, but I never got it to work. Compiling was not a problem, but it never worked correctly; The first call to initialize Gecko invariably crashed the application. You might be better off trying to fix PBear. I use it myself, and IMHO it should be easy to port. Michael. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] print source from IDE
Hi, that's correct, at least in some cases. If you insert some new lines in a existing unit without saving, for example, those are not printed and the print is truncated at original line count. (before the new lines insert). This looks like an internal SynEdit problem (Line count not being updated?) May I suggest that you open a bug report? (http://bugs.freepascal.org) Regards, Gerard. On Fri, Feb 27, 2009 at 12:46 PM, Andrea Mauri andrea.mauri...@gmail.com wrote: Dear all, when I print the source from IDE the last line is not printed. This happens both printing a selection of the source or the whole unit. Lazarus svn, FPC 2.2.2 WinXp. Regards, Andrea ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Patch for improved window layout
I've attached a patch for ide\main.pp (rev 18847) which provides a more coherent window layout. Its not exactly what I had in my mind (an approximation of which can be seen when you open a default early Delphi installation) mostly because there doesn't seem to be a method to obtain the real window boundaries including the titlebar and frame (as a sidenote, this is something that should be addressed since this functionality is required for automatic alignment of multiwindow applications). So I did what I could with the existing resources. Some modifications I did has to do with the first look of the program. I believe that 0.9.26 leaves much to be desired regarding the initial look. So I modified the code in order to: 1. The component bar (MainIDEBar)'s height is calculated to match the contents and current window size. 2. Line up the windows so they don't appear inconsistent and they don't overlap each other. 3. Make the default new form size to cover a large area made up of the area left by the object inspector, the main bar and the messages window. 4. Resize the source editor window to be smaller than the default new form size but similar in aspect. 5. When a new project is made (or the IDE starts), the form is brought on top instead of the source editor. 6. Try to not mess it up with other themes :-) I did #1 and #2 to make Lazarus look less chaotic and more consistent. I really believe it looks better now. I did #3, #4 and #5 to focus on the visual side of Lazarus. Lazarus's strength is the RAD, which means the user doesn't have to type code. By showing the form (#5) instead of the code this is highlighted, especially since the form is not a tiny little form (#3). I made the source window a little smaller to enhance even more this aspect of the IDE: the design part is more important than the code part so the code editor is hidden behind the form (#4). Lastly I did #6, or at least I tried to, for practical reasons. This is how Lazarus looks with my patch after an initial launch (I just launched the program): Aero: http://gimme.badsectoracula.com/winlazarus_aero.png Basic: http://gimme.badsectoracula.com/winlazarus_vistabasic.png Classic: http://gimme.badsectoracula.com/winlazarus_classic.png I would like to make Classic look more tight, but the frame width of Aero and Basic makes the windows to overlap. Here is where I wanted to be able to use the real window bounds instead of the client areas. I compromised a bit and I gave more weight to the Aero/Basic themes since this is what most people will use in the near future. Also from my experience from Linux, many window managers look more like Aero/Basic than Classic. So here it is, I hope this patch will be added (after maybe tested in other platforms - I only have Windows Vista available at the moment). I really believe it makes Lazarus look more professional and coherent. Kostas lazarus-mainide-winlayout.patch Description: Binary data ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Patch for improved window layout
I updated the patch with some suggestions by fpcfan and martin_frb from #lazarus-ide: 1. Added some failsafe code to make sure there won't be negative results in dual mode screens 2. The form is brought to top only if a new project is made at startup The attached patch replaces the previous one. Kostas -- From: Kostas Michalopoulos badsec...@slashstone.com Sent: Saturday, February 28, 2009 10:01 PM To: lazarus@lazarus.freepascal.org Subject: [Lazarus] Patch for improved window layout I've attached a patch for ide\main.pp (rev 18847) which provides a more coherent window layout. Its not exactly what I had in my mind (an approximation of which can be seen when you open a default early Delphi installation) mostly because there doesn't seem to be a method to obtain the real window boundaries including the titlebar and frame (as a sidenote, this is something that should be addressed since this functionality is required for automatic alignment of multiwindow applications). So I did what I could with the existing resources. Some modifications I did has to do with the first look of the program. I believe that 0.9.26 leaves much to be desired regarding the initial look. So I modified the code in order to: 1. The component bar (MainIDEBar)'s height is calculated to match the contents and current window size. 2. Line up the windows so they don't appear inconsistent and they don't overlap each other. 3. Make the default new form size to cover a large area made up of the area left by the object inspector, the main bar and the messages window. 4. Resize the source editor window to be smaller than the default new form size but similar in aspect. 5. When a new project is made (or the IDE starts), the form is brought on top instead of the source editor. 6. Try to not mess it up with other themes :-) I did #1 and #2 to make Lazarus look less chaotic and more consistent. I really believe it looks better now. I did #3, #4 and #5 to focus on the visual side of Lazarus. Lazarus's strength is the RAD, which means the user doesn't have to type code. By showing the form (#5) instead of the code this is highlighted, especially since the form is not a tiny little form (#3). I made the source window a little smaller to enhance even more this aspect of the IDE: the design part is more important than the code part so the code editor is hidden behind the form (#4). Lastly I did #6, or at least I tried to, for practical reasons. This is how Lazarus looks with my patch after an initial launch (I just launched the program): Aero: http://gimme.badsectoracula.com/winlazarus_aero.png Basic: http://gimme.badsectoracula.com/winlazarus_vistabasic.png Classic: http://gimme.badsectoracula.com/winlazarus_classic.png I would like to make Classic look more tight, but the frame width of Aero and Basic makes the windows to overlap. Here is where I wanted to be able to use the real window bounds instead of the client areas. I compromised a bit and I gave more weight to the Aero/Basic themes since this is what most people will use in the near future. Also from my experience from Linux, many window managers look more like Aero/Basic than Classic. So here it is, I hope this patch will be added (after maybe tested in other platforms - I only have Windows Vista available at the moment). I really believe it makes Lazarus look more professional and coherent. Kostas ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus lazarus-mainide-winlayout2.patch Description: Binary data ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PBear and Gecko SDK components in Lazarus..
Michael Van Canneyt escreveu: On Fri, 27 Feb 2009, domini...@savagesoftware.com.au wrote: Hi all, From reading this thread... http://forum.lazarus.freepascal.org/index.php/topic,6158.15.html It seems that Phil had done some work in getting PBear working with Lazarus. Does anyone know who Phil is, and if this is now available from SVN? I am interested in both PBear and GeckoSDK working with Lazarus apps, particularly on Windows and Mac OS X. Currently I have an application which uses PBear with Delphi on Windows and it works really well. Having it work on Mac OS X with Lazarus/FreePascal would be the easiest porting route, but I'm willing to consider GeckoSDK as an alternative just to ensure cross-platform browser support. I tried GeckoSDK once, but I never got it to work. Compiling was not a problem, but it never worked correctly; The first call to initialize Gecko invariably crashed the application. You might be better off trying to fix PBear. I use it myself, and IMHO it should be easy to port. Is not that easy. It uses the windows specific (GlobalAlloc etc) functions to manage memory, some asm, specific bitmap functions. I started to port it but stopped since is not a priority to me and i still think that webkit is the best way to go. Unfortunatelly, at the time i looked (~six monthes ago) building and using webkit under win32 was not straightforward although possible with some work. Luiz ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Patch for improved window layout
2009/3/1 Kostas Michalopoulos badsec...@slashstone.com: 1. The component bar (MainIDEBar)'s height is calculated to match the contents and current window size. This is a good idea in general, however your patch IMHO has some flaws, which I'll list in order from least to most significant: 1) CalcMainIDEBarHeight function has inconsistent indenting and no try-finally block 2) I am not sure how this code takes into account MainMenu height 3) It certainly does not take into account possibility for more than a single row of components on the tab (which, I presume, was the main reason for original large height). Perhaps a better suggestion would be to measure sizes of real components, instead of creating a fake ones. 2. Line up the windows so they don't appear inconsistent and they don't overlap each other. 3. Make the default new form size to cover a large area made up of the area left by the object inspector, the main bar and the messages window. 4. Resize the source editor window to be smaller than the default new form size but similar in aspect. These are merely a tweaks for magic constants. I have nothing against it, but I think this is, at best, a workaround until docking code is finished. -- Alexander S. Klenin ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Patch for improved window layout
2009/3/1 Kostas Michalopoulos badsec...@slashstone.com: 1. The component bar (MainIDEBar)'s height is calculated to match the contents and current window size. This is a good idea in general, however your patch IMHO has some flaws, which I'll list in order from least to most significant: 1) CalcMainIDEBarHeight function has inconsistent indenting and no try-finally block I'll check it. 2) I am not sure how this code takes into account MainMenu height It doesn't. It seems the menu is considered as a part of the frame so its added transparently when the SetBounds is called. 3) It certainly does not take into account possibility for more than a single row of components on the tab (which, I presume, was the main reason for original large height). The original large height wasn't large enough to show two rows. But I don't have encountered a computer that even fills the component bar. Although by resizing it I saw that the components simply disappear, which I think isn't a good idea. I believe the best would be to scroll (like in Delphi - ideally they would fill the available horizontal/vertical space and scroll for the rest) or at least have a visual clue that there are more components. Perhaps a better suggestion would be to measure sizes of real components, instead of creating a fake ones. Initially I thought this, but the problem is that the real components are aligned so their sizes mean nothing. 2. Line up the windows so they don't appear inconsistent and they don't overlap each other. 3. Make the default new form size to cover a large area made up of the area left by the object inspector, the main bar and the messages window. 4. Resize the source editor window to be smaller than the default new form size but similar in aspect. These are merely a tweaks for magic constants. I have nothing against it, but I think this is, at best, a workaround until docking code is finished. They make Lazarus look better now at least :-). Kostas ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus