Tweak some widgets for better appearance on Windows.
This commit is contained in:
parent
4fdd7ba705
commit
343309d6ba
|
@ -37,11 +37,11 @@ class UpdateWindow(object):
|
||||||
message_label = tk.Label(self.frame, textvariable=self.message)
|
message_label = tk.Label(self.frame, textvariable=self.message)
|
||||||
message_label.grid(columnspan=2, padx=20, pady=20)
|
message_label.grid(columnspan=2, padx=20, pady=20)
|
||||||
|
|
||||||
self.update_button = tk.Button(self.frame, text="Update", height=2, width=4,
|
self.update_button = tk.Button(self.frame, text="Update",
|
||||||
command=self._update_inara)
|
command=self._update_inara)
|
||||||
self.update_button.grid(row=1, column=0, pady=10)
|
self.update_button.grid(row=1, column=0, pady=10)
|
||||||
|
|
||||||
config_button = tk.Button(self.frame, text="Config", height=1, width=2,
|
config_button = tk.Button(self.frame, text="Config",
|
||||||
command=self._update_settings)
|
command=self._update_settings)
|
||||||
config_button.grid(row=1, column=1, sticky=tk.E+tk.S, padx=5, pady=5)
|
config_button.grid(row=1, column=1, sticky=tk.E+tk.S, padx=5, pady=5)
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ class UpdateWindow(object):
|
||||||
self.parent.update()
|
self.parent.update()
|
||||||
try:
|
try:
|
||||||
update_inara(self.session)
|
update_inara(self.session)
|
||||||
self.message.set("Update successful! (Last update: %s)" %
|
self.message.set("Update successful!\n(Last update: %s)" %
|
||||||
datetime.now().isoformat(' ')[:16])
|
datetime.now().isoformat(' ')[:16])
|
||||||
except:
|
except:
|
||||||
self.message.set("Error updating! Double-check your config,\nor try again later.")
|
self.message.set("Error updating! Double-check your config,\nor try again later.")
|
||||||
|
@ -76,6 +76,7 @@ def main():
|
||||||
if args.gui:
|
if args.gui:
|
||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
root.wm_title("Inara Updater")
|
root.wm_title("Inara Updater")
|
||||||
|
root.minsize(200, 100)
|
||||||
settings = utils.get_settings(True, root)
|
settings = utils.get_settings(True, root)
|
||||||
app = UpdateWindow(root, settings)
|
app = UpdateWindow(root, settings)
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|
Reference in New Issue
Block a user