Powered by Lazarus/Fpc logo lazarus / 8-Other ---------------------------------------------------------------------- clauslack · 2011-03-09 14:59 Any "Powered by Lazarus/Fpc" logo like this http://www.freepascal.org/pic/lazarus_produced_logo.gif but for autoadhesive sticker?  aprox. (400 x 400) Thanks ---------------------------------------------------------------------- minesadorada · 2014-06-06 15:28 An old topic, but it inspired me to create a 'PoweredBy' component (Windows only) This component is a 1-second splash screen that fades in the 'powered by lazarus' logo as a shaped graphic window. A visual component that installs on the 'Additional' tab.  Drop in and use method 'poweredby1.ShowPoweredByForm' in your form.create event handler. Wiki reference and download link: http://wiki.lazarus.freepascal.org/Poweredby ---------------------------------------------------------------------- Mike.Cornflake · 2014-06-07 07:00 :-)   I've been meaning to add a splash to a few projects - this'll do nicely.  Many thanks. ---------------------------------------------------------------------- minesadorada · 2014-06-07 09:34 Updated to v1.0.1.1 to cope with Linux laz v0.9.x Under gtk PoweredBy will now splash a square regular graphic.  Windows behaviour is as before. ---------------------------------------------------------------------- jwdietrich · 2014-06-07 10:08 Thanks for sharing this nice idea. The PoweredBy component also works neatly on Mac OS X with the Carbon widgetset. ---------------------------------------------------------------------- minesadorada · 2014-06-07 17:12 Quote from: jwdietrich on June 07, 2014, 12:08:41 pmThanks for sharing this nice idea. The PoweredBy component also works neatly on Mac OS X with the Carbon widgetset.  Thanks - I've updated the wiki with the linux/macOS graphic. Can Carbon cope with canvas.SetShape and tform.alphablend?  I have no testing platform ---------------------------------------------------------------------- Dick, from the internet · 2014-06-07 18:56 Good job!  Thanks for sharing.   regards,       geno ---------------------------------------------------------------------- Rails · 2014-06-07 19:30 Thank you for this. It's neat. I have played with it a bit and have a couple of observations and suggestions. For my application, it popped up too soon because of other stuff going on in the background. Moving it to the main form onActivate event took care of that issue. I changed the source so that the delay was three seconds. The one second seems too fast. I would really like to see an adjustable delay property added to the component. While Linux/GTK can't currently handle fading due to lack of alpha channel support, Linux/QT should be able to do it. My application uses QT (but IDE and my desktop are GTK) and alpha channel transparency work just fine. So I commented out the Windows IfDefs and recompiled. I still didn't get the fading, but I did get the round Windows Icon just fine, with no hint of its form.    I didn't really look into why it wouldn't fade when compiling for QT. If I get a chance, I will see if I can figure it out. Again, thanks for the component. I will definitely use it. ---------------------------------------------------------------------- minesadorada · 2014-06-08 10:31 Hi @rails, Thank you for the suggestions. I have added a DelaySeconds property and also instead of the {$IFDEF} conditionals, TPoweredBy now looks at the WidgetSet.LCLPlatform property to decide whether to show a rounded graphic or not. Also added some version info properties for Widgetset, FPC OSTarget and LCL to help in testing. Please re-download V1.0.2.0 of PoweredBy (same link) to check it out. Incidentally, for a fully-featured Splash (and About dialog) component, try http://wiki.lazarus.freepascal.org/SplashAbout for size. I am very interested to find out which widgetsets support the SetShape method.. ---------------------------------------------------------------------- Rails · 2014-06-08 14:01 OK, I tried the new version. It worked, still without the fade, but I see one new problem and have one more suggestion. The DelaySeconds property setting is too coarse. It should be in milliseconds so that a user can set the delay as a fraction of a second. Personally, I think 1500 milliseconds would be about right, while I'm sure others would choose differently. I ran across a situation that caused the logo to pop up during program execution. I realize that I can deal with this by using a boolean splashNotShown value in my own code, but you could also consider including this as a boolean ShowOnlyOnce property.  Thanks, Rails ---------------------------------------------------------------------- minesadorada · 2014-06-08 14:33 @Rails Both good ideas and both incorporated  in V1.0.3.0 - re-download for latest version. It didn't occur to me that a user would put the ShowPoweredByForm method in Form.Activate() This is the benefit of publicly sharing code:  new ideas and constructive criticism - which I always appreciate ---------------------------------------------------------------------- Rails · 2014-06-08 16:11 Quote from: minesadorada on June 08, 2014, 04:33:53 pm It didn't occur to me that a user would put the ShowPoweredByForm method in Form.Activate() When I worked for a living (I'm retired now), I was real good at finding holes in other peoples plans.  Some folks didn't much appreciate that.    On the other hand, upper management sure liked the cost savings.  As I mentioned earlier, with the application I am working on, the OnCreate event can occur well before the main form is actually displayed, so I tried the OnActivate event which worked well. There had been a recent discussion here about that event. Some folks argued that the event occurred only once, others disagreed. When I tried it. it worked splendidly--until another form came to the front. That resulted in the main form's OnActivate event firing any time the user clicked on the main form, which was still visible. I can now testify that the OnActivate event can and does occur multiple times in some circumstances. The new version takes care of that. It works perfectly. Thanks, Rails ---------------------------------------------------------------------- Rails · 2014-06-08 18:04 Well, well. I just happened to turn compositing on (xfwm4 window manger compositor setting was off) and then the logo fade in started to work. I normally have compositing turned off on all my desktops. Even so I have no trouble using alpha blending in my application.  More food for thought, it seems.  Rails ---------------------------------------------------------------------- minesadorada · 2014-06-08 20:25 My only Linux testing environment is a copy of Puppy Linux/Lazarus 0.9.x/GTK2 so feedback on other platforms is very welcome. Quote from: RailsAs I mentioned earlier, with the application I am working on, the OnCreate event can occur well before the main form is actually displayed On another splash component I've been writing, if the DelayMilliSecs property is set to zero, then the splash window shows until the OnApplicationIdle event is fired.  Do you think that would be a useful addition to TPoweredBy? I retired from commercial programming in the days of Delphi 5 - that's why I have so much time available to write free code nowadays ---------------------------------------------------------------------- Dick, from the internet · 2014-06-08 21:26 @Rails - thanks for the tip on. compositing.  I was fairly certain that I had alpha blending working at one time, but couldn't remember how.  I really need to keep a more detailed list of all the settings changes I make from one OS install to the next!    regards,     geno ---------------------------------------------------------------------- Rails · 2014-06-09 10:44 Quote from: minesadorada on June 08, 2014, 10:25:19 pm On another splash component I've been writing, if the DelayMilliSecs property is set to zero, then the splash window shows until the OnApplicationIdle event is fired.  Do you think that would be a useful addition to TPoweredBy? Sorry for the delay responding. I've been beating my head against the wall on something else. I'm honestly not sure if that would be useful or not. I guess it would have to be try it and see. Rails ---------------------------------------------------------------------- Rails · 2014-06-09 10:47 Quote from: geno on June 08, 2014, 11:26:32 pm@Rails - thanks for the tip on. compositing.  I was fairly certain that I had alpha blending working at one time, but couldn't remember how.  I really need to keep a more detailed list of all the settings changes I make from one OS install to the next!    regards,     geno List? Yeah, not a bad idea. I'll have to try that. See my remark in the post above. ---------------------------------------------------------------------- Dick, from the internet · 2014-06-09 16:28 QuoteList? Yeah, not a bad idea. I'll have to try that. See my remark in the post above.   I have been using Wiki-On-A-Stick to track software additions or deletions, or track the different system problems I have encountered/fixed.  But until now, I never really thought about adding a page just for little tidbits such as this; by the time I reinstall the OS, I will have forgotten most of the little tweaks I make on a day to day basis. The big issue is spending the whole five minutes needed to add a few lines to the page before I forget what I did!  @minesadorada: sorry bro, I'm not trying to hijack your thread!  But I will say that I like the latest changes; keep up the good work!   regards,       geno ---------------------------------------------------------------------- minesadorada · 2014-06-09 18:21 Quote from: geno on June 09, 2014, 06:28:02 pm@minesadorada: sorry bro, I'm not trying to hijack your thread!  But I will say that I like the latest changes; keep up the good work! No problem geno The PoweredBy component lends itself well to adding as a subcomponent to an existing custom component: Constructor Create()( // Use tPoweredBy as a subcomponent // Register a TClassPropertyEditor in order to display it correctly   fPoweredBy := TPoweredBy.Create(Self);   fPoweredBy.SetSubComponent(true);  // Tell the IDE to store the modified properties   fPoweredBy.Name:='PoweredBy'; ---------------------------------------------------------------------- Mike.Cornflake · 2014-06-10 08:48 Quote from: minesadorada on June 09, 2014, 08:21:59 pmThe PoweredBy component lends itself well to adding as a subcomponent to an existing custom component: Constructor Create()( // Use tPoweredBy as a subcomponent // Register a TClassPropertyEditor in order to display it correctly   fPoweredBy := TPoweredBy.Create(Self);   fPoweredBy.SetSubComponent(true);  // Tell the IDE to store the modified properties   fPoweredBy.Name:='PoweredBy'; Useful.  Worth adding to wiki in fact.  Hope you don't mind, I have now updated the wiki. http://wiki.lazarus.freepascal.org/Poweredby#Use ---------------------------------------------------------------------- minesadorada · 2014-06-11 09:00 Quote from: Mike.Cornflake on June 10, 2014, 10:48:14 am ... Useful.  Worth adding to wiki in fact.  Hope you don't mind, I have now updated the wiki. http://wiki.lazarus.freepascal.org/Poweredby#Use I added to the pseudocode in the wiki to make it a usable example. ---------------------------------------------------------------------- minesadorada · 2014-07-29 21:55 I just fixed a bug in PoweredBy that caused the About property to display incorrectly. The fixed version is in lazarusccr: https://sourceforge.net/projects/lazarus-ccr/ SVN:  https://svn.code.sf.net/p/lazarus-ccr/svn