fix a bug in source code.

master
CHUN YU YAO 2022-11-14 17:26:52 +08:00
parent fec1b6904d
commit 8a41f9de4f
2 changed files with 10 additions and 12 deletions

View File

@ -67,7 +67,7 @@ ssl._create_default_https_context = ssl._create_unverified_context
#附註1沒有寫的很好很多地方應該可以模組化。 #附註1沒有寫的很好很多地方應該可以模組化。
#附註2 #附註2
CONST_APP_VERSION = u"MaxBot (2022.11.14) ver.2" CONST_APP_VERSION = u"MaxBot (2022.11.14) ver.5"
CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom" CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom"
CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top" CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top"
@ -260,6 +260,7 @@ def load_chromdriver_uc(webdriver_path):
options.add_argument('--disable-translate') options.add_argument('--disable-translate')
options.add_argument('--lang=zh-TW') options.add_argument('--lang=zh-TW')
driver = None
if os.path.exists(chromedriver_path): if os.path.exists(chromedriver_path):
print("Use user driver path:", chromedriver_path) print("Use user driver path:", chromedriver_path)
#driver = uc.Chrome(service=chrome_service, options=options, suppress_welcome=False) #driver = uc.Chrome(service=chrome_service, options=options, suppress_welcome=False)

View File

@ -20,7 +20,7 @@ import platform
import json import json
import webbrowser import webbrowser
CONST_APP_VERSION = u"MaxBot (2022.11.14) ver.2" CONST_APP_VERSION = u"MaxBot (2022.11.14) ver.5"
CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom" CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom"
CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top" CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top"
@ -492,7 +492,7 @@ def applyNewLanguage():
tabControl.tab(0, text=translate[language_code]["preference"]) tabControl.tab(0, text=translate[language_code]["preference"])
tabControl.tab(1, text=translate[language_code]["about"]) tabControl.tab(1, text=translate[language_code]["about"])
lbl_slogan.config(text=translate[language_code]["maxbot_slogan"]) lbl_slogan.config(text=translate[language_code]["maxbot_slogan"])
lbl_help.config(text=translate[language_code]["help"]) lbl_help.config(text=translate[language_code]["help"])
lbl_donate.config(text=translate[language_code]["donate"]) lbl_donate.config(text=translate[language_code]["donate"])
@ -1268,19 +1268,16 @@ def PreferenctTab(root, config_dict, language_code, UI_PADDING_X):
def AboutTab(root, language_code): def AboutTab(root, language_code):
from PIL import Image, ImageTk
row_count = 0 row_count = 0
frame_group_header = Frame(root) frame_group_header = Frame(root)
group_row_count = 0 group_row_count = 0
image = Image.open("maxbot_logo2_single.png") logo_filename = "maxbot_logo2_single.ppm"
photo = ImageTk.PhotoImage(image) logo_img = PhotoImage(file=logo_filename)
#logo_offset_x = ((GUI_SIZE_WIDTH - image.size[0]) / 2) - 20
lbl_logo = Label(frame_group_header, image=logo_img)
lbl_logo = Label(frame_group_header, image=photo) lbl_logo.image = logo_img
lbl_logo.image = photo
lbl_logo.grid(column=0, row=group_row_count, columnspan=2) lbl_logo.grid(column=0, row=group_row_count, columnspan=2)
group_row_count +=1 group_row_count +=1
@ -1391,7 +1388,7 @@ def main():
AboutTab(tab2, language_code) AboutTab(tab2, language_code)
GUI_SIZE_MACOS = str(GUI_SIZE_WIDTH) + 'x' + str(GUI_SIZE_HEIGHT) GUI_SIZE_MACOS = str(GUI_SIZE_WIDTH) + 'x' + str(GUI_SIZE_HEIGHT)
GUI_SIZE_WINDOWS=str(GUI_SIZE_WIDTH-60) + 'x' + str(GUI_SIZE_HEIGHT-60) GUI_SIZE_WINDOWS=str(GUI_SIZE_WIDTH-60) + 'x' + str(GUI_SIZE_HEIGHT-90)
GUI_SIZE =GUI_SIZE_MACOS GUI_SIZE =GUI_SIZE_MACOS
import platform import platform