Recent

Author Topic: fpGUI Toolkit v1.0 release for FPC 2.6.2  (Read 92150 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1165
    • HowTos Considered Harmful?
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #90 on: April 23, 2013, 10:11:21 pm »
Graeme is not known around here for his tact :). Many open source developers don't write software for the money. They often do it in their spare time as well, in the hope that others may find it useful, give some feedback and even contribute to it.
If it doesn't meet your expectations or frustrates you there are better ways to express yourself. Anyway this is Graeme just being Graeme - the Lazarus and FPC scene would be boring without him :D. I'd say just take it as far as you can if it meets your needs and offer some feedback and suggestions, sooner or later he will get round to making some more improvements but it may not be at the pace you want.

I'm simply backing up my opinion. If it bothers you that much there has to be some truth to it. And if you can't stand true observations, how do you expect LCL contributors to take your, let's say, negative attitude.

Anyway, I've applied your "toolbox" dpi "fix". You'll notice there are issues still, this time not only with widgets but with form positioning on screen.

http://postimg.org/image/jqk24egff/

The way I look at it, you're right, I've no intention of using fpGUI as it is. But you should be thanking me for free testing and feedback. Only now I'm not interested anymore in helping you get fpGUI right.

Lazarus 3.0/FPC 3.2.2

Fred vS

  • Hero Member
  • *****
  • Posts: 3946
    • StrumPract is the musicians best friend
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #91 on: April 23, 2013, 10:11:36 pm »
@ Graeme : In your example : Testing Custom Style there  are some other custom styles.

Why do you use the old Windows XP style for all of your examples ?

Maybe a other style (more recent, or better, your own) for all of your examples will have more impact on the potential "clients".

I agree this is a detail, but details are important for beginners.
« Last Edit: April 23, 2013, 10:19:06 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #92 on: April 23, 2013, 10:34:00 pm »
I made a 'datapack' using the imageconvert demo in the tools directory.
It houses all the essential bitmaps to create the Lazarus splash screen. Idea is to use it as a testing unit.

Question...what is the simplest way to call these bitmaps and composite them direct to GDI/x11?
Is it as simple as adding some 'template-able' code onto the datapack.pas file?




http://ootools.googlecode.com/files/datapackunit.pas
2.3 mb

What is the simplest way implement a 'load_img' function like...
Code: [Select]
var
img:TfpgImage;

begin
img:= load_img(newimg_Stock_Logo1);
end;
« Last Edit: April 23, 2013, 11:03:13 pm by CaptBill »

Fred vS

  • Hero Member
  • *****
  • Posts: 3946
    • StrumPract is the musicians best friend
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #93 on: April 24, 2013, 12:18:56 am »
Any plan for a fpgTrayicon ?

LCL Trayicon are working good with win32 and carbon widgetset.

GTK2 Trayicon does not work on Ubuntu-Unity systems (even with white-list enabled).

Only Qt Trayicon works on Ubuntu-Unity system ( but the transparency of icon is not respected ).

Maybe fpgTrayicon gonna be the first working trayicon for all systems ( and respecting the transparency of icon ) ?
« Last Edit: April 24, 2013, 12:29:41 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Graeme

  • Hero Member
  • *****
  • Posts: 1526
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #94 on: April 24, 2013, 12:34:05 am »
I'm simply backing up my opinion. If it bothers you that much there has to be some truth to it.
No, you are just very full of yourself, don't listen to what others say, and bordering obnoxious.

Quote
Anyway, I've applied your "toolbox" dpi "fix".
You did a half job of that. You never applied the ScaleDPI() call to the splash screen.

Quote
But you should be thanking me for free testing and feedback.
Please don't do me any favours!
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1526
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #95 on: April 24, 2013, 12:44:54 am »
Why do you use the old Windows XP style for all of your examples ?
It's actually the Windows 2000 style - which is actually the "native style" of all Windows since Windows 2000. The WinXP, Vista etc looks are just themes. Disable those, and Windows reverts back to the Win2000 look.  I just like the Win2000 look and rectangular buttons, so that stuck with me. No other reason really. Developers are welcome to switch themes in fpGUI, or implement there own - its rather easy.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #96 on: April 24, 2013, 12:57:36 am »
In my 96 dpi win7 system everything is right now! 8-)

Code: [Select]
procedure TMainForm.FormShow(Sender: TObject);
begin
  if fpgApplication.Screen_dpi <> cDPI then
    ScaleDPI(self, cDPI); // cDPI is the dpi you designed the form at
end;

Thank you Graeme!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Fred vS

  • Hero Member
  • *****
  • Posts: 3946
    • StrumPract is the musicians best friend
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #97 on: April 24, 2013, 01:14:55 am »
Quote
Quote from: Fred vS on April 23, 2013, 10:11:36 pm

    Why do you use the old Windows XP style for all of your examples ?

It's actually the Windows 2000 style - which is actually the "native style" of all Windows since Windows 2000. The WinXP, Vista etc looks are just themes. Disable those, and Windows reverts back to the Win2000 look.  I just like the Win2000 look and rectangular buttons, so that stuck with me. No other reason really. Developers are welcome to switch themes in fpGUI, or implement there own - its rather easy.

Graeme you are too modest. Your fpgui is a revolution. We must promote your work. I gonna promote your job, trust me.  ;)
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Graeme

  • Hero Member
  • *****
  • Posts: 1526
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #98 on: April 24, 2013, 01:17:05 am »
Question...what is the simplest way to call these bitmaps and composite them direct to GDI/x11?
Is it as simple as adding some 'template-able' code onto the datapack.pas file?

First, you need to know what type of images are stored in the byte arrays... In your case, they were PNG images, so you need the fpg_imgfmt_png unit in the uses clause. Then you could do the following - say we are creating a splash screen form, and painting directly on the Form's canvas.

Code: [Select]
TSplashForm = class(TForm)
 private
   FImgBack: TfpgImage;     { here we cache the images for performance }
   FImgLeopard: TfpgImage;
   ...
   procedure FormPaint(Sender: TObject);  // OnPaint event handler
   procedure FormCreate(Sender: TObject);  // OnCreate event handler
 end;

procedure TMainForm.FormCreate(Sender: TObject);
begin
  { load background image }
  FImgBack:= LoadImage_PNG(@newimg_matrixblue, sizeof(newimg_matrixblue));
  { load leopard image and create a transparency mask from a pixel sample }
  FImgLeopard := LoadImage_PNG(@newimg_Stock_artLeopard1, sizeof(newimg_Stock_artLeopard1));
  FImgLeopard.CreateMaskFromSample(0,0);
  FImgLeopard.UpdateImage;  // required because we changed the mask
  ...
end;

procedure TMainForm.FormPaint(Sender: TObject);
begin
  Canvas.DrawImage(0, 0, FImgBack);
  Canvas.DrawImage(0, 0, FImgLeopard);
end;

Note: Remember to free the images in the Form's destructor.

If you really want to improve performance, I would rather make the splash image or about logo a single image with all elements. Then simply paint text information like "registered user" or "version info" over the image at runtime. This is what pretty much everybody does - even Microsoft.

PS:
I really like the splash screen image you attached.... Is that the new Lazarus IDE splash screen image? I haven't pulled a Lazarus update in a while.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1526
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #99 on: April 24, 2013, 01:24:13 am »
Any plan for a fpgTrayicon ?
There is a TfpgTrayIcon component in fpGUI, but currently only implemented for Linux  in v1.0 release. I've tested it with various linux distros, FreeBSD, and various window managers. I heard that Canonical broke TrayIcon support in Unity - they just love to break Linux standards, and fragment Linux desktop even more. I haven't tested with Unity, but from what you said, I don't know if it will work there.

The Windows support didn't make it into v1.0 (trayicon was a last minute feature), but it will be added in a short while.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Fred vS

  • Hero Member
  • *****
  • Posts: 3946
    • StrumPract is the musicians best friend
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #100 on: April 24, 2013, 01:49:50 am »
Quote
There is a TfpgTrayIcon component in fpGUI

Perfect, im patient ( i already wait a lot for Qt/transparency/icon after sending bug-info to bugtracker ).

I have analysed the complains of Doctor in WidgetSet.

Quote
However, the widget sets are not truly native. This means you get odd and ugly looking components. Even more, there is no widget awareness for custom user settings, i.e. higher DPI.

But you have a solution for all of those comments.

If i may suggest something, it could be a good idea to add those solutions in your examples. So no more irreverence complains of beginners.
« Last Edit: April 24, 2013, 01:51:44 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #101 on: April 24, 2013, 04:07:42 am »

If you really want to improve performance, I would rather make the splash image or about logo a single image with all elements. Then simply paint text information like "registered user" or "version info" over the image at runtime. This is what pretty much everybody does - even Microsoft.

PS:
I really like the splash screen image you attached.... Is that the new Lazarus IDE splash screen image? I haven't pulled a Lazarus update in a while.

Thanks just what I needed.

Yeah, I just wanted a file to play around with for testing of graphical elements/compositing. The splash screen was made to look close to the actual splash screen. The only thing the same is the Leopard. The other elements I just searched for 'blue background' in Google and picked one that looked similar to the current background. The logo and textual elements are done with stock fonts in Gimp. Just me getting the hang of Gimp.

There are many, many optimizations that could be done hahaha. Notice the 2.3mb file...should easily be less than 500k.

Question: Could we just as easily store pure binary files vs. a byte array? Or am I missing something?
« Last Edit: April 24, 2013, 04:29:40 am by CaptBill »

itmitica

  • Jr. Member
  • **
  • Posts: 85
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #102 on: April 24, 2013, 06:40:32 am »
I'm simply backing up my opinion. If it bothers you that much there has to be some truth to it.
No, you are just very full of yourself, don't listen to what others say, and bordering obnoxious.

If your fpGUI has more issues than you can handle, please, don't take it out on me. And if you chose to willingly cut off features form the fpGUI for the general public by not including "toolbox" for DPI "fix", the blame is yours alone. Deal with it.


Quote
Anyway, I've applied your "toolbox" dpi "fix".
You did a half job of that. You never applied the ScaleDPI() call to the splash screen.

I see you are particularly quiet about the issues of the odd form placement after applying the "fix"... Deal with it.


Quote
But you should be thanking me for free testing and feedback.
Please don't do me any favours!

You have a commercial interest in this product of yours. Since you had the brown nosing already covered in this thread by others, I placed some kicks in your arse about the product, which were meant to help you take a few steps ahead. You chose to take it personal. Well, good luck with that.


In the end, you've publicly displayed a product. I am allowed to have my own opinion and I made it so. Deal with it.

--
Mitică
« Last Edit: April 24, 2013, 06:49:31 am by itmitica »

Fred vS

  • Hero Member
  • *****
  • Posts: 3946
    • StrumPract is the musicians best friend
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #103 on: April 24, 2013, 12:40:47 pm »
@ Itmitica
Quote
In my book, what you are right now is either naive or oblivious.

Maybe, but in my book, when i try something new, and if i find something bad i ask :

Quote
Hello. I just try your new release, i find something strange when i change the DPI resolution, is that normal ?

And i wait for the solution.

If no answer, maybe i gonna say the release is not perfect.

I never gonna begin posting something like you :
Quote
Your release is shit, Lazarus people, do not use it...

But, sure, we do not read the same books.

You said  that developers have to educate their clients.

I say, please, start with educating yourself even.....
« Last Edit: April 24, 2013, 01:09:13 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Graeme

  • Hero Member
  • *****
  • Posts: 1526
    • Graeme on the web
Re: fpGUI Toolkit v1.0 release for FPC 2.6.2
« Reply #104 on: April 24, 2013, 12:47:13 pm »
Question: Could we just as easily store pure binary files vs. a byte array? Or am I missing something?
You can of course load images from a file at runtime. I simply started using the byte arrays (years ago) to embed resources into my applications, to make deployment easier. At that time FPC didn't have any Resources support, and why Lazarus had to implement there own resource system.

FPC Resources support is still not 100% though. FPC includes the fpcres tool, but that only works with *.res files. There are still no FPC tools to compile a *.rc text file into a *.res binary file. Windows has it, but Linux, FreeBSD etc doesn't. When that is fixed, then the byte array idea could probably be dropped. At least for now the byte array idea works on all platforms and you can store anything in the byte array (eg: sound clips), not just images.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018