only show ignore auto updates on windows

This commit is contained in:
2026-01-24 10:28:58 +01:00
parent d057624548
commit b783d0a0cb
+11 -8
View File
@@ -13,6 +13,7 @@ from PySide6.QtWidgets import (
QSpinBox, QSpinBox,
QCheckBox, QCheckBox,
) )
import platform
def settings_dialog(self): def settings_dialog(self):
@@ -32,14 +33,16 @@ def settings_dialog(self):
update_checkbox_layout = QHBoxLayout() update_checkbox_layout = QHBoxLayout()
# ignore updates checkbox # ignore updates checkbox
update_checkbox = QCheckBox()
update_checkbox_container.setLayout(update_checkbox_layout) if platform.system() == "Windows":
update_checkbox_layout.addWidget(QLabel("Ignore Updates: ")) update_checkbox = QCheckBox()
update_checkbox_layout.addStretch() update_checkbox_container.setLayout(update_checkbox_layout)
update_checkbox.setChecked(state.ignore_updates) update_checkbox_layout.addWidget(QLabel("Ignore Updates: "))
update_checkbox.toggled.connect(lambda checked: setattr(state, 'ignore_updates', checked)) update_checkbox_layout.addStretch()
update_checkbox_layout.addWidget(update_checkbox) update_checkbox.setChecked(state.ignore_updates)
dialog.layout().addWidget(update_checkbox_container) update_checkbox.toggled.connect(lambda checked: setattr(state, 'ignore_updates', checked))
update_checkbox_layout.addWidget(update_checkbox)
dialog.layout().addWidget(update_checkbox_container)
# auto-resume downloads checkbox # auto-resume downloads checkbox