Konfabulator widget released - version 0.91

This forum provides an FAQ for users as well as allowing you to ask questions about MundayWeb's very popular BOINC stats services.
Post Reply
User avatar
clarkf1
Established Member
Posts: 175
Joined: Sun Jun 05, 2005 11:36 am

Post by clarkf1 » Fri Aug 05, 2005 6:11 pm

Got it working....

I downloaded Konfabulator 2.1.1 and it's fixed (must have been a bug at their end)

Download was slow - DNS problems.

Red Squirrel
New Member
Posts: 9
Joined: Mon Aug 08, 2005 6:03 pm

Sizing widget

Post by Red Squirrel » Mon Aug 08, 2005 6:28 pm

Hi Neil,
I have been able to change the height of the widget, depending on how many projects are attached, by adding the following code after the buildStats() function calls.

Code: Select all

main_window.height=vGap*(projects+1)+34+14
background.height=vGap*(projects+1) +34 +14
Unfortunately to keep the footer position at the bottom of the widget, it then needs a calculation for the footer position, and another call to buildStats() as follows:

Code: Select all

footerVPos=background.height-2
buildStats();
or maybe more createText calls would be better to display the footer line.
Hope this is of help to those who want to change the height of the widget. :D
Alan

Neil
Site Admin
Posts: 1339
Joined: Mon Apr 18, 2005 8:35 pm
Location: UK
Contact:

Post by Neil » Mon Aug 08, 2005 8:10 pm

Thanks for the suggestions.

One of the main problems is that the background image itself is a PNG and can't be resized. I would have to supply various backgrounds to allow for changes in the widget size.

What do you think?

Neil.

Red Squirrel
New Member
Posts: 9
Joined: Mon Aug 08, 2005 6:03 pm

Post by Red Squirrel » Mon Aug 08, 2005 8:55 pm

I just used the background image you supplied with the widget, and it seems to stretch or compress itself as required. I've tried it with an account with 7 projects attached (changed max projects attached to 8 ) and one with just two and the background changes height accordingly, still with the curved corners! Not sure why, but it seems to work! :wink:
Alan

Neil
Site Admin
Posts: 1339
Joined: Mon Apr 18, 2005 8:35 pm
Location: UK
Contact:

Post by Neil » Mon Aug 08, 2005 9:31 pm

Cool!

I'll try it out when I get back from my hols - sorting out last minute things at the mo. Luckily, I should have a few days off once I return on the 20th, so I can put some work into the widget, as well as rebuilding my Linux machine so I can get the SuperKaramba widget to work.

Cheers,

Neil.

Red Squirrel
New Member
Posts: 9
Joined: Mon Aug 08, 2005 6:03 pm

Post by Red Squirrel » Tue Aug 16, 2005 1:02 pm

Hi Neil,
For changing the length of the widget to take into account the number of projects attached to, I think the following coding might be a bit more efficient than what I suggested earlier:

Code: Select all

buildStats();
		
//Code added to change height of widget depending on no of projects attached to.

main_window.height=vGap*(projects+1)+34+14
background.height=vGap*(projects+1) +34 +14
footerVPos=background.height-2
updatedTxt = createText(4, footerVPos, 10, fontName, "bold", "left", txtColour, statsUpdated);
updatedTxtShadow = createShadowText(updatedTxt);

footerTxt = createText(-1, footerVPos, 10, fontName, "bold", "center", txtColour, "boinc.mundayweb.com");
footerTxtShadow = createShadowText(footerTxt);
versionTxt = createText(-1, footerVPos, 10, fontName, "bold", "right", txtColour, VERSION_NO);
versionTxtShadow = createShadowText(versionTxt);

//End of modification
It just needs adding after each buildStats() call.
Regards, Alan

Neil
Site Admin
Posts: 1339
Joined: Mon Apr 18, 2005 8:35 pm
Location: UK
Contact:

Post by Neil » Sun Aug 21, 2005 9:00 pm

Hi all,

Tonight I have released version 0.4 of the Konfabulator widget. This version will now automatically resize itself based on the number of projects that a user has.

Thanks to Red Squirrel for the help - I only needed these three lines in the end:

Code: Select all

main_window.height=vGap*(projects+1)+34+14
background.height=vGap*(projects+1) +34 +14
footerVPos=background.height-2 
These were added to the buildStats routine.

I found in testing that at least version 2.1.1 of Konfabulator is needed as versions 2.0 up to but not including 2.1.1 do not process the "delete" object statements!!!

If you have any problems, please let me know.

Cheers,

Neil.

Red Squirrel
New Member
Posts: 9
Joined: Mon Aug 08, 2005 6:03 pm

Post by Red Squirrel » Tue Aug 23, 2005 8:05 am

Hi Neil,
I just noticed a couple of bugs in v0.4 of BOINC widget.
If you change text colour in the preferences, the footer line stays the original colour and the date disappears from the line. Same if you change the User ID - the date disappears. I think this is because the footer line is not rewritten when the widget is already loaded.
Also there is no blank line between the totals and the footer line. Thats why I had

Code: Select all

main_window.height = vGap * (projectTotal +1) + startHOffset + 14;
background.height = vGap * (projectTotal +1)+ startHOffset + 14;

not just

Code: Select all

main_window.height = vGap * projectTotal + startHOffset + 14;
background.height = vGap * projectTotal + startHOffset + 14;

Hope I don't sound too "picky"!
Regards,
Alan

Neil
Site Admin
Posts: 1339
Joined: Mon Apr 18, 2005 8:35 pm
Location: UK
Contact:

Post by Neil » Tue Aug 23, 2005 11:57 am

Hi Alan,

Thanks for pointing out the colour bugs - I forgot to add the colour code in the buildStats routine. I also made a semantic error regarding the vOffset property of the date text fields which wouldn't haven been caught at runtime.

These have now been fixed in version 0.41.

I personally prefer not having a gap between the total line and the stats. However, I can introduce an option to put the gap in if users want?

Cheers,

Neil.

Red Squirrel
New Member
Posts: 9
Joined: Mon Aug 08, 2005 6:03 pm

Post by Red Squirrel » Tue Aug 23, 2005 1:30 pm

Thanks for the speedy upgrade to v0.41.
Works a treat now! :)
Alan

User avatar
clarkf1
Established Member
Posts: 175
Joined: Sun Jun 05, 2005 11:36 am

Post by clarkf1 » Tue Aug 23, 2005 9:15 pm

Neil,

I've created a preference which allows you to switch the background on or off (I prefer it off - it's looks better with my desktop)

I'll email you the .kon file. I've commented the lines I've added.

I've just noticed the preference label would probably be better as just "Background"

Neil
Site Admin
Posts: 1339
Joined: Mon Apr 18, 2005 8:35 pm
Location: UK
Contact:

Post by Neil » Wed Aug 24, 2005 11:57 am

Hi all,

I have released version 0.5 which adds two new preferences.

The first was supplied by ClarkF1 and allows you to turn the background image on or off.

The second is the "gap" preference which allows you to add a gap between the total line and the stats lines if you wish.

Any problems, let me know.

Cheers,

Neil.

Neil
Site Admin
Posts: 1339
Joined: Mon Apr 18, 2005 8:35 pm
Location: UK
Contact:

Post by Neil » Wed Aug 24, 2005 6:12 pm

Hi again.

I have just released version 0.51 after ClarkF1 correctly pointed out that shadow text was lacking on any text that is centered or right aligned.

Basically, when you set the alignment of text to anything other than "left", the hOffset value is set to "-1". Therefore, when aligning the shadow text you can't!

To get round this, I had a hunt around the Konfabulator forums. In the end I created a function called "alignObj" which when given a text object and either "left, "center" or "right", it will align the object correctly. It basically uses the width of the main window and the text object to work out the correct alignment. One pre-condition is that the data property of the text field must be set in order for the correct alignment to be calculated.

Sorry for the constant updates!

Neil.

User avatar
clarkf1
Established Member
Posts: 175
Joined: Sun Jun 05, 2005 11:36 am

Post by clarkf1 » Wed Aug 24, 2005 6:17 pm

Now I have the option of adding a space between the Projects and the Totals I can't decide which I prefer.

Help :lol: :lol: :lol:
Image
Cruncher: i7-8700K (6 cores, 12 threads), 16GB DDR4-3000Mhz, 8GB NVIDIA 1080

Tim
New Member
Posts: 2
Joined: Sun Aug 28, 2005 7:41 am
Location: Wyoming
Contact:

Seti Classic

Post by Tim » Sun Aug 28, 2005 7:53 am

How about setting this up for seti classic???
Image

Post Reply