From 07b98d2a95be3e828d4f547e53cda497fbf1834a Mon Sep 17 00:00:00 2001 From: Semjon Kerner Date: Wed, 24 Mar 2021 12:20:16 +0100 Subject: [PATCH 1/2] increase attraction of yes-button --- fishy/gui/update_dialog.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fishy/gui/update_dialog.py b/fishy/gui/update_dialog.py index 9313310..f9ad6f9 100644 --- a/fishy/gui/update_dialog.py +++ b/fishy/gui/update_dialog.py @@ -24,10 +24,11 @@ def show(currentversion, newversion, returns): top.destroy() pixelVirtual = PhotoImage(width=1, height=1) # trick to use buttonWidth as pixels, not #symbols + dialogBtnNo = Button(top, text="No " + str(chr(10005)), fg='red4', command=_clickNo, image=pixelVirtual, width=buttonWidth, compound="c") + dialogBtnNo.grid(row=2, column=0, padx=5, pady=5) dialogBtnYes = Button(top, text="Yes " + str(chr(10003)), fg='green', command=_clickYes, image=pixelVirtual, width=buttonWidth, compound="c") - dialogBtnYes.grid(row=2, column=0, padx=5, pady=5) - dialogBtnNo = Button(top, text="No " + str(chr(10005)), fg='red', command=_clickNo, image=pixelVirtual, width=buttonWidth, compound="c") - dialogBtnNo.grid(row=2, column=1, padx=5, pady=5) + dialogBtnYes.grid(row=2, column=1, padx=5, pady=5) + dialogBtnYes.focus_set() top.protocol('WM_DELETE_WINDOW', _clickNo) From cd3e5a91b50d509d549bee878710606cbc73b7e1 Mon Sep 17 00:00:00 2001 From: Semjon Kerner Date: Wed, 24 Mar 2021 12:20:38 +0100 Subject: [PATCH 2/2] add logo and name to update popup --- fishy/gui/update_dialog.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fishy/gui/update_dialog.py b/fishy/gui/update_dialog.py index f9ad6f9..b9dd244 100644 --- a/fishy/gui/update_dialog.py +++ b/fishy/gui/update_dialog.py @@ -2,11 +2,14 @@ from multiprocessing import Process, Manager from tkinter import * import time +from fishy import helper + def show(currentversion, newversion, returns): top = Tk() - top.title("A wild update appears!") + top.title("A wild fishy update appeared!") + top.iconbitmap(helper.manifest_file('icon.ico')) - dialogLabel = Label(top, text="There is a new update available ("+currentversion+"->"+newversion+"). Do you want to update now?") + dialogLabel = Label(top, text="There is a new fishy update available ("+currentversion+"->"+newversion+"). Do you want to update now?") dialogLabel.grid(row=0, columnspan=2, padx=5, pady=5) cbVar = IntVar()