diff --git a/plugins/tenet/util/qt/util.py b/plugins/tenet/util/qt/util.py index 758f41a..0e5ba04 100644 --- a/plugins/tenet/util/qt/util.py +++ b/plugins/tenet/util/qt/util.py @@ -53,7 +53,7 @@ def get_dpi_scale(): fm = QtGui.QFontMetricsF(font) # xHeight is expected to be 40.0 at normal DPI - return fm.height() / 173.0 + return int(fm.height() / 173.0) def normalize_font(font_size): """ @@ -78,9 +78,9 @@ def compute_color_on_gradient(percent, color1, color2): r2, g2, b2, _ = color2.getRgb() # compute the new color across the gradient of color1 -> color 2 - r = r1 + percent * (r2 - r1) - g = g1 + percent * (g2 - g1) - b = b1 + percent * (b2 - b1) + r = r1 + int(percent * (r2 - r1)) + g = g1 + int(percent * (g2 - g1)) + b = b1 + int(percent * (b2 - b1)) # return the new color return QtGui.QColor(r,g,b) \ No newline at end of file diff --git a/plugins/tenet/util/qt/waitbox.py b/plugins/tenet/util/qt/waitbox.py index c0b05f9..5e55dd8 100644 --- a/plugins/tenet/util/qt/waitbox.py +++ b/plugins/tenet/util/qt/waitbox.py @@ -62,7 +62,7 @@ def _ui_init(self): # configure the main widget / form self.setSizeGripEnabled(False) self.setModal(True) - self._dpi_scale = get_dpi_scale()*5.0 + self._dpi_scale = get_dpi_scale()*5 # initialize abort button self._abort_button = QtWidgets.QPushButton("Cancel") @@ -99,4 +99,4 @@ def _ui_layout(self): self.setMinimumHeight(height) # compute the dialog layout - self.setLayout(v_layout) \ No newline at end of file + self.setLayout(v_layout) diff --git a/plugins/tenet/util/update.py b/plugins/tenet/util/update.py index 195089c..57e8d25 100644 --- a/plugins/tenet/util/update.py +++ b/plugins/tenet/util/update.py @@ -40,8 +40,8 @@ def async_update_check(current_version, callback): return # convert vesrion #'s to integer for easy compare... - version_remote = int(''.join(re.findall('\d+', remote_version))) - version_local = int(''.join(re.findall('\d+', current_version))) + version_remote = int(''.join(re.findall(r'\d+', remote_version))) + version_local = int(''.join(re.findall(r'\d+', current_version))) # no updates available... logger.debug(" - Local: 'v%s' vs Remote: '%s'" % (current_version, remote_version))