release 1.7.1

* fix bug with zero values in tooltip
- removed error label
This commit is contained in:
arcan1s 2014-04-02 23:48:44 +04:00
parent d63b33903a
commit 20c2a4eb6b
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ cmake_policy (SET CMP0015 NEW)
project (pytextmonitor) project (pytextmonitor)
set (PROJECT_VERSION_MAJOR 1) set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 7) set (PROJECT_VERSION_MINOR 7)
set (PROJECT_VERSION_PATCH 0) set (PROJECT_VERSION_PATCH 1)
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
message (STATUS "Version: ${PROJECT_VERSION}") message (STATUS "Version: ${PROJECT_VERSION}")

View File

@ -171,9 +171,6 @@ class pyTextWidget(plasmascript.Applet):
self.tooltip.setSubText('') self.tooltip.setSubText('')
except Exception as strerror: except Exception as strerror:
self.tooltip.setSubText(str(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 return

View File

@ -48,6 +48,9 @@ class Tooltip():
bound[0] = value bound[0] = value
elif (value > bound[1]): elif (value > bound[1]):
bound[1] = value bound[1] = value
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]))] norm = [maxOne[0] / len(values[type]), maxOne[1] / (1.5*(bound[1] - bound[0]))]
pen.setColor(QColor(colors[type])) pen.setColor(QColor(colors[type]))
if (down): if (down):