Heartbeat

Karamba & Superkaramba

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5 .0
Description:

Just for women ? ?

beating heart depends on the gentooearth http://www.kde-look.org/content/show.php?content=43507
logo and Heartlogo

paolopan83

13 years ago

Hi, I like your gadget, but I think it would look better, if the heart enlarges keeping his center in the same position. I sugget you to modify the code as follow (I marked my changes with ###PAOLO###):


#heartbeat

import karamba

imageFiles = [
"pics/Station100.png",
"pics/Station101.png",
"pics/Station102.png",
"pics/Station103.png",
"pics/Station104.png",
"pics/Station105.png",
"pics/Station106.png",
"pics/Station107.png",
"pics/Station108.png",
"pics/Station109.png",
"pics/Station110.png",
"pics/Station111.png",
"pics/Station112.png",
"pics/Station111.png",
"pics/Station110.png",
"pics/Station109.png",
"pics/Station108.png",
"pics/Station107.png",
"pics/Station106.png",
"pics/Station107.png",
"pics/Station108.png",
"pics/Station109.png",
"pics/Station110.png",
"pics/Station111.png",
"pics/Station112.png",
"pics/Station111.png",
"pics/Station110.png",
"pics/Station109.png",
"pics/Station108.png",
"pics/Station107.png",
"pics/Station106.png",
"pics/Station105.png",
"pics/Station104.png",
"pics/Station103.png",
"pics/Station102.png",
"pics/Station101.png",

]
images = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
image = 0
init = 0

###PAOLO###
#The sizes of the biggest image
MaxX=120
MaxY=129
###/PAOLO###


def initWidget(widget):
#buggy in current version
pass

def widgetUpdated(widget):
global imageFiles
global images
global image
global init

if init == 0:
for i in range(36):
images[i] = karamba.createImage(widget, 150, 150, imageFiles[i])
karamba.moveImage(widget, images[0], 0, 0)
init = 1
else:
karamba.moveImage(widget, images[image], 150, 150)
if image < 35:
image = image + 1
else:
image = 0
###PAOLO###
x=(MaxX-karamba.getImageWidth(widget,images[image]))/2
y=(MaxY-karamba.getImageHeight(widget,images[image]))/2
karamba.moveImage(widget, images[image], x, y)
###PAOLO###

karamba.redrawWidget(widget)

def widgetClicked(widget, x, y, button):
pass

def widgetMouseMoved(widget, x, y, button):
pass

# This will be printed when the widget loads.
print "Loaded my python extension!"


If you need I will email you the code (the tabs are all flatten, grrr).
Write me at paolopantaleo -at- gmail -dot- com

Report

ciasa

14 years ago

You might want to remove the backup files from your archive before posting (*~). They add 307kb to the overall filesize. The archive would only be around 100k without them.

Report

C

burgarello

14 years ago

thank you for your advice ....


done

Report

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
updated Aug 07 2006
added Aug 07 2006
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0