Skip to content

Commit

Permalink
Merge pull request #7 from rsre/0.52
Browse files Browse the repository at this point in the history
Merge 0.52 changes
  • Loading branch information
rsre authored Jul 14, 2020
2 parents f14db64 + ce4daab commit c795400
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
5 changes: 5 additions & 0 deletions Change_Log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,8 @@ Version 0.50:

Version 0.51:
- Fixed problem in 0.50 that resulted in origin shifting if laser was not in upper left corner when a job was started.

Version 0.52:
- Added margin to prevent warning about out of bounds vector features when they are really close to the page boundary.
- Added explicit font definition for GUI

34 changes: 25 additions & 9 deletions k40_whisperer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"""
app_name = "K40 Whisperer"
version = '0.51'
version = '0.52'
title_text = app_name+" V"+version

import sys
Expand Down Expand Up @@ -2068,14 +2068,15 @@ def Open_SVG(self,filemname):
#self.make_raster_coords()
self.refreshTime()

if self.Design_bounds[0] > self.VengData.bounds[0] or\
self.Design_bounds[0] > self.VcutData.bounds[0] or\
self.Design_bounds[1] < self.VengData.bounds[1] or\
self.Design_bounds[1] < self.VcutData.bounds[1] or\
self.Design_bounds[2] > self.VengData.bounds[2] or\
self.Design_bounds[2] > self.VcutData.bounds[2] or\
self.Design_bounds[3] < self.VengData.bounds[3] or\
self.Design_bounds[3] < self.VcutData.bounds[3]:
margin=0.0625 # A bit of margin to prevent the warningwindow for designs that are close to being within the bounds
if self.Design_bounds[0] > self.VengData.bounds[0]+margin or\
self.Design_bounds[0] > self.VcutData.bounds[0]+margin or\
self.Design_bounds[1] < self.VengData.bounds[1]-margin or\
self.Design_bounds[1] < self.VcutData.bounds[1]-margin or\
self.Design_bounds[2] > self.VengData.bounds[2]+margin or\
self.Design_bounds[2] > self.VcutData.bounds[2]+margin or\
self.Design_bounds[3] < self.VengData.bounds[3]-margin or\
self.Design_bounds[3] < self.VcutData.bounds[3]-margin:
line1 = "Warning:\n"
line2 = "There is vector cut or vector engrave data located outside of the SVG page bounds.\n\n"
line3 = "K40 Whisperer will attempt to use all of the vector data. "
Expand Down Expand Up @@ -5786,6 +5787,21 @@ def apply(self):
app.master.minsize(800,560)
app.master.geometry("800x560")

try:
try:
import tkFont
default_font = tkFont.nametofont("TkDefaultFont")
except:
import tkinter.font
default_font = tkinter.font.nametofont("TkDefaultFont")

default_font.configure(size=12)
default_font.configure(family='San Francisco')
#print(default_font.cget("size"))
#print(default_font.cget("family"))
except:
debug_message("Font Set Failed.")

if LOAD_MSG != "":
message_box("K40 Whisperer",LOAD_MSG)
debug_message("Debuging is turned on.")
Expand Down

0 comments on commit c795400

Please sign in to comment.