summaryrefslogtreecommitdiff
path: root/grc/gui/Utils.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2016-11-12 07:01:58 -0800
committerJohnathan Corgan <johnathan@corganlabs.com>2016-11-12 07:01:58 -0800
commit0e509fc38cb9051340ef9bf07f51a528643e636f (patch)
tree8bc4c5b928ba71e1ed8310aaf368c86adbadd1b0 /grc/gui/Utils.py
parentcaf9120c31b5a0dfbcbc24fdd5d958017a7db963 (diff)
parentb27e602ac7db40383363f7297a4834ac2647641e (diff)
Merge branch 'master' into next
Diffstat (limited to 'grc/gui/Utils.py')
-rw-r--r--grc/gui/Utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/grc/gui/Utils.py b/grc/gui/Utils.py
index 7d15d47142..3ab8d2009e 100644
--- a/grc/gui/Utils.py
+++ b/grc/gui/Utils.py
@@ -136,3 +136,7 @@ def align_to_grid(coor, mode=round):
def scale(coor, reverse=False):
factor = DPI_SCALING if not reverse else 1 / DPI_SCALING
return tuple(int(x * factor) for x in coor)
+
+def scale_scalar(coor, reverse=False):
+ factor = DPI_SCALING if not reverse else 1 / DPI_SCALING
+ return int(coor * factor)