Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugins/tenet/util/qt/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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)
4 changes: 2 additions & 2 deletions plugins/tenet/util/qt/waitbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -99,4 +99,4 @@ def _ui_layout(self):
self.setMinimumHeight(height)

# compute the dialog layout
self.setLayout(v_layout)
self.setLayout(v_layout)
4 changes: 2 additions & 2 deletions plugins/tenet/util/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down