Skip to content

Commit c31c5f3

Browse files
Reload the text if the font type is changed.
1 parent 3222e08 commit c31c5f3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ui/dialogs/settings_dialog.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
class SettingsDialog(QDialog):
3030
def __init__(self, parent):
3131
super().__init__(parent)
32+
self.parent = parent
3233
self.setWindowTitle("الإعدادات")
3334
self.resize(500, 400)
3435
self.reciters_manager = RecitersManager(data_folder / "quran" / "reciters.db")
@@ -235,6 +236,9 @@ def save_settings(self):
235236
else:
236237
StartupManager.remove_from_startup(program_english_name)
237238

239+
if SettingsManager.current_settings["reading"]["font_type"] != self.font_type_combo.currentData():
240+
self.parent.quran_view.setText(self.parent.quran.reload_quran(self.font_type_combo.currentData()))
241+
238242
general_settings = {
239243
"run_in_background_enabled": self.run_in_background_checkbox.isChecked(),
240244
"auto_start_enabled": self.start_on_system_start_checkbox.isChecked(),
@@ -319,10 +323,7 @@ def set_current_settings(self):
319323
if index != -1:
320324
self.action_combo.setCurrentIndex(index)
321325

322-
323-
stored_ids = current_settings["reading"]["font_type"]
324-
index = self.font_type_combo.findData(stored_ids)
326+
stored_id = current_settings["reading"]["font_type"]
327+
index = self.font_type_combo.findData(stored_id)
325328
if index != -1:
326329
self.font_type_combo.setCurrentIndex(index)
327-
328-

0 commit comments

Comments
 (0)