Skip to content

Commit

Permalink
Always base size on unchecked state
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Münker <mail@chipmuenk.de>
  • Loading branch information
chipmuenk committed Dec 4, 2024
1 parent 1c01fe0 commit 11c5f0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyfda/libs/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@ def setText(self, text):
return

def sizeHint(self):
is_checked = self.isChecked()
self.setChecked(False)
s = QPushButton.sizeHint(self)
w = self.__lbl.sizeHint()
s.setWidth(w.width() + 2 * self.margin)
# s.setHeight(w.height())
self.setChecked(is_checked)
return s

# def clicked(self):
Expand Down

0 comments on commit 11c5f0d

Please # to comment.