mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-14 14:25:50 +00:00
release 1.7.1
* fix bug with zero values in tooltip - removed error label
This commit is contained in:
@ -171,9 +171,6 @@ class pyTextWidget(plasmascript.Applet):
|
||||
self.tooltip.setSubText('')
|
||||
except Exception as strerror:
|
||||
self.tooltip.setSubText(str(strerror))
|
||||
self.label_error = Plasma.Label(self.applet)
|
||||
self.label_error.setText('<font color="red">ERROR</font>')
|
||||
self.layout.addItem(self.label_error)
|
||||
return
|
||||
|
||||
|
||||
|
@ -48,7 +48,10 @@ class Tooltip():
|
||||
bound[0] = value
|
||||
elif (value > bound[1]):
|
||||
bound[1] = value
|
||||
norm = [maxOne[0] / len(values[type]), maxOne[1] / (1.5*(bound[1] - bound[0]))]
|
||||
if ((bound[0] == 0.0) and (bound[0] == 0.0)):
|
||||
norm = [maxOne[0] / len(values[type]), maxOne[1] / 1.5]
|
||||
else:
|
||||
norm = [maxOne[0] / len(values[type]), maxOne[1] / (1.5*(bound[1] - bound[0]))]
|
||||
pen.setColor(QColor(colors[type]))
|
||||
if (down):
|
||||
shift = (types.index(type) - 1) * maxOne[0]
|
||||
|
Reference in New Issue
Block a user