Skip to content

Commit 40e244d

Browse files
authored
Merge pull request #9948 from f321x/disable_disabling_i_agree_ToU
qt: fix: ToU 'I Accept' button not getting enabled
2 parents 787d5fc + 52e2ced commit 40e244d

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

electrum/gui/qt/wizard/terms_of_use.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -52,32 +52,7 @@ def __init__(self, parent, wizard):
5252
self.tos_label = WWLabel()
5353
self.tos_label.setText(messages.MSG_TERMS_OF_USE)
5454
self.layout().addWidget(self.tos_label)
55-
self._valid = False
56-
57-
# Find the scroll area and connect to its scrollbar
58-
QTimer.singleShot(100, self.check_scroll_position)
59-
self.window().installEventFilter(self)
60-
61-
def eventFilter(self, obj, event):
62-
if obj == self.window() and event.type() == QEvent.Type.Resize:
63-
# catch window resize events to check if the scrollbar is visible
64-
QTimer.singleShot(100, self.check_scroll_position)
65-
return super().eventFilter(obj, event)
66-
67-
def check_scroll_position(self):
68-
scroll_area = self.window().findChild(QScrollArea)
69-
if scroll_area and scroll_area.verticalScrollBar() \
70-
and scroll_area.verticalScrollBar().isVisible():
71-
scrollbar = scroll_area.verticalScrollBar()
72-
def on_scroll_change(value):
73-
if value >= scrollbar.maximum() - 5: # Allow 5 pixel margin
74-
self._valid = True
75-
self.on_updated()
76-
scrollbar.valueChanged.connect(on_scroll_change)
77-
else:
78-
# scrollbar is not visible or not found
79-
self._valid = True
80-
self.on_updated()
55+
self._valid = True
8156

8257
def apply(self):
8358
pass

0 commit comments

Comments
 (0)