canvas size
This commit is contained in:
parent
1ca9aec247
commit
d51dc0e909
2 changed files with 3 additions and 14 deletions
|
@ -187,5 +187,8 @@ class SizeAndScaleDialog(Dialog):
|
|||
location_config["lon"] = location.lon
|
||||
location_config["alt"] = location.alt
|
||||
location_config["scale"] = location.scale
|
||||
preferences = self.app.guiconfig["preferences"]
|
||||
preferences["width"] = width
|
||||
preferences["height"] = height
|
||||
self.app.save_config()
|
||||
self.destroy()
|
||||
|
|
|
@ -14,8 +14,6 @@ class PreferencesDialog(Dialog):
|
|||
self.theme = tk.StringVar(value=preferences["theme"])
|
||||
self.terminal = tk.StringVar(value=preferences["terminal"])
|
||||
self.gui3d = tk.StringVar(value=preferences["gui3d"])
|
||||
self.width = tk.StringVar(value=preferences["width"])
|
||||
self.height = tk.StringVar(value=preferences["height"])
|
||||
self.draw()
|
||||
|
||||
def draw(self):
|
||||
|
@ -60,16 +58,6 @@ class PreferencesDialog(Dialog):
|
|||
entry = ttk.Entry(frame, textvariable=self.gui3d)
|
||||
entry.grid(row=3, column=1, sticky="ew")
|
||||
|
||||
label = ttk.Label(frame, text="Canvas width (in pixel)")
|
||||
label.grid(row=4, column=0, pady=2, padx=2, sticky="w")
|
||||
entry = ttk.Entry(frame, textvariable=self.width)
|
||||
entry.grid(row=4, column=1, sticky="ew")
|
||||
|
||||
label = ttk.Label(frame, text="Canvas height (in pixel)")
|
||||
label.grid(row=5, column=0, pady=2, padx=2, sticky="w")
|
||||
entry = ttk.Entry(frame, textvariable=self.height)
|
||||
entry.grid(row=5, column=1, sticky="ew")
|
||||
|
||||
def draw_buttons(self):
|
||||
frame = ttk.Frame(self.top)
|
||||
frame.grid(sticky="ew")
|
||||
|
@ -93,7 +81,5 @@ class PreferencesDialog(Dialog):
|
|||
preferences["editor"] = self.editor.get()
|
||||
preferences["gui3d"] = self.gui3d.get()
|
||||
preferences["theme"] = self.theme.get()
|
||||
preferences["width"] = self.width.get()
|
||||
preferences["height"] = self.height.get()
|
||||
self.app.save_config()
|
||||
self.destroy()
|
||||
|
|
Loading…
Add table
Reference in a new issue