Minor Tweaks

Improved readability of the settings window
This commit is contained in:
frarol96 2024-07-16 15:23:10 +00:00
parent ab5fa5f4e3
commit e530b83ea6

View File

@ -1,5 +1,5 @@
# Define version number # Define version number
PROGRAM_VERSION = "1.7.0.2" PROGRAM_VERSION = "1.7.0.3"
# Define a persistent path for the configuration files in the AppData folder # Define a persistent path for the configuration files in the AppData folder
PERSISTENT_DIR = os.path.join(os.getenv('APPDATA'), 'ERSC Mod Updater') PERSISTENT_DIR = os.path.join(os.getenv('APPDATA'), 'ERSC Mod Updater')
@ -443,7 +443,7 @@ def open_settings_window():
continue continue
section_label = QLabel(section) section_label = QLabel(section)
section_label.setFont(QFont("Arial", 12, QFont.Bold)) section_label.setFont(QFont("Arial", 12, QFont.Bold))
settings_grid.addWidget(section_label, row, 0, 1, 2) settings_grid.addWidget(section_label, row, 0, 1, 4, alignment=Qt.AlignHCenter)
row += 1 row += 1
settings[section] = {} settings[section] = {}
for key, value in config_parser.items(section): for key, value in config_parser.items(section):
@ -476,10 +476,11 @@ def open_settings_window():
settings[section][key] = entry settings[section][key] = entry
disclaimer = QLabel("(Do not use sl2)") disclaimer = QLabel("(Do not use sl2)")
disclaimer.setFont(QFont("Arial", 8, QFont.StyleItalic)) disclaimer.setFont(QFont("Arial", 8, QFont.StyleItalic))
settings_grid.addWidget(disclaimer, row, 2, 1, 1) settings_grid.addWidget(disclaimer, row+1, 1, 1, 1, alignment=Qt.AlignHCenter)
reset_button = QPushButton("Reset") reset_button = QPushButton("Reset")
reset_button.clicked.connect(lambda e=entry, dv=default_value: e.setText(dv)) reset_button.clicked.connect(lambda e=entry, dv=default_value: e.setText(dv))
settings_grid.addWidget(reset_button, row, 3, 1, 1) settings_grid.addWidget(reset_button, row, 2, 1, 1)
row += 1
elif section == 'LANGUAGE': elif section == 'LANGUAGE':
dropdown = QComboBox() dropdown = QComboBox()
options = get_locale_options(config["mod_path"]) options = get_locale_options(config["mod_path"])
@ -687,11 +688,4 @@ def create_gui():
app.exec_() app.exec_()
if __name__ == "__main__": if __name__ == "__main__":
create_gui() create_gui()
# TODO
# - Add auto-conversion of vanilla save
#
# Command to convert into executable
# python -m PyInstaller --onefile --noconsole --icon="C:\Users\fraro\ERSC Updater\logo.ico" --distpath "C:\Users\fraro\ERSC Updater\output" "C:\Users\fraro\ERSC Updater\ERSC Updater.py"