From 7a902246d6cce9ff0841d7985bc2603fb66f853c Mon Sep 17 00:00:00 2001 From: Effer Date: Sat, 28 Jan 2017 20:10:18 +0100 Subject: [PATCH] Double size icon in user settings --- CNC.py | 2 ++ ToolsPage.py | 1 + Utils.py | 2 ++ bCNC.ini | 1 + 4 files changed, 6 insertions(+) diff --git a/CNC.py b/CNC.py index d12a9122d..c2d1a9602 100644 --- a/CNC.py +++ b/CNC.py @@ -768,6 +768,8 @@ def loadConfig(config): except: pass try: CNC.lasercutter = bool(int(config.get(section, "lasercutter"))) except: pass + try: CNC.doublesizeicon = bool(int(config.get(section, "doublesizeicon"))) + except: pass try: CNC.acceleration_x = float(config.get(section, "acceleration_x")) except: pass try: CNC.acceleration_y = float(config.get(section, "acceleration_y")) diff --git a/ToolsPage.py b/ToolsPage.py index 690474a42..14965412e 100644 --- a/ToolsPage.py +++ b/ToolsPage.py @@ -499,6 +499,7 @@ def __init__(self, master): self.variables = [ ("units" , "bool", 0 , _("Units (inches)")) , ("lasercutter" , "bool", 0 , _("Lasercutter")) , + ("doublesizeicon", "bool", 0 , _("Double Size Icon")) , ("acceleration_x", "mm" , 25.0 , _("Acceleration x")) , ("acceleration_y", "mm" , 25.0 , _("Acceleration y")) , ("acceleration_z", "mm" , 5.0 , _("Acceleration z")) , diff --git a/Utils.py b/Utils.py index 860b7054e..d33d9d040 100644 --- a/Utils.py +++ b/Utils.py @@ -96,6 +96,8 @@ def loadIcons(): name,ext = os.path.splitext(os.path.basename(img)) try: icons[name] = PhotoImage(file=img) + if getBool("CNC", "doublesizeicon"): + icons[name] = icons[name].zoom(2,2) except TclError: pass diff --git a/bCNC.ini b/bCNC.ini index a1a5e7090..aa746cd95 100644 --- a/bCNC.ini +++ b/bCNC.ini @@ -125,6 +125,7 @@ command.2 = G53 G0 X[prbx] Y[prby] Z[prbz] [CNC] units = 0 lasercutter = 0 +doublesizeicon = 0 acceleration_x = 25 acceleration_y = 25 acceleration_z = 50