Skip to content

Commit

Permalink
Merge pull request #491 from Effer/master-canvas-color
Browse files Browse the repository at this point in the history
Change canvas back color as option
  • Loading branch information
vlachoudis authored Jan 12, 2017
2 parents 615db3a + e9d1a10 commit 2b90c09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CNCCanvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
TAB_COLOR = "DarkOrange"
WORK_COLOR = "Orange"
CAMERA_COLOR = "Cyan"
CANVAS_COLOR = "White"

ENABLE_COLOR = "Black"
DISABLE_COLOR = "LightGray"
Expand Down Expand Up @@ -1315,6 +1316,7 @@ def draw(self, view=None): #, lines):
# Initialize gantry position
#----------------------------------------------------------------------
def initPosition(self):
self.configure(background=CANVAS_COLOR)
self.delete(ALL)
self._cameraImage = None
gr = max(3,int(CNC.vars["diameter"]/2.0*self.zoom))
Expand Down Expand Up @@ -1933,7 +1935,7 @@ def loadConfig(self):
global INSERT_COLOR, GANTRY_COLOR, MARGIN_COLOR, GRID_COLOR
global BOX_SELECT, ENABLE_COLOR, DISABLE_COLOR, SELECT_COLOR
global SELECT2_COLOR, PROCESS_COLOR, MOVE_COLOR, RULER_COLOR
global CAMERA_COLOR, PROBE_TEXT_COLOR
global CAMERA_COLOR, PROBE_TEXT_COLOR, CANVAS_COLOR
global DRAW_TIME

self.draw_axes.set( bool(int(Utils.getBool("Canvas", "axes", True))))
Expand Down Expand Up @@ -1963,6 +1965,7 @@ def loadConfig(self):
RULER_COLOR = Utils.getStr("Color", "canvas.ruler", RULER_COLOR)
CAMERA_COLOR = Utils.getStr("Color", "canvas.camera", CAMERA_COLOR)
PROBE_TEXT_COLOR = Utils.getStr("Color", "canvas.probetext", PROBE_TEXT_COLOR)
CANVAS_COLOR = Utils.getStr("Color", "canvas.background", CANVAS_COLOR)

#----------------------------------------------------------------------
def saveConfig(self):
Expand Down
1 change: 1 addition & 0 deletions bCNC.ini
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ canvas.select = Blue
canvas.select2 = DarkCyan
canvas.selectbox = Cyan
canvas.probetext = Green
canvas.background = White

ribbon.active = LightYellow
ribbon.select = #c0ffc0
Expand Down

0 comments on commit 2b90c09

Please sign in to comment.