Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Dec 27, 2024
1 parent ece7f83 commit 3e171eb
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions py/LunaTranslator/gui/inputdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,6 @@ def __refresh(regist, line, combo: SuperCombo):
)
)
lineW.addWidget(combo)
_w = QWidget()
_w.setLayout(lineW)
lineW = _w
elif line["type"] == "okcancel":
lineW = QDialogButtonBox(
QDialogButtonBox.StandardButton.Ok
Expand Down Expand Up @@ -642,19 +639,14 @@ def __refresh(regist, line, combo: SuperCombo):
)

regist[key] = functools.partial(__temp.__getitem__, "k")
_ = QWidget()
_.setLayout(lineW)
lineW = _
elif line["type"] == "switch":
lineW = MySwitch(sign=dd[key])
regist[key] = lineW.isChecked
_ = QHBoxLayout()
_.addStretch()
_.addWidget(lineW)
_.addStretch()
_w = QWidget()
_w.setLayout(_)
lineW = _w
lineW = _
elif line["type"] in ["spin", "intspin"]:

__temp = {"k": dd[key]}
Expand Down Expand Up @@ -683,9 +675,9 @@ def __refresh(regist, line, combo: SuperCombo):
lineW.setEnabled(dd[key])
hbox.addWidget(switch)
hbox.addWidget(lineW)
_ = QWidget()
_.setLayout(hbox)
lineW = _
lineW = hbox
if isinstance(lineW, QLayout):
lineW.setContentsMargins(0, 0, 0, 0)
if ("name" not in line) or (line["type"] == "split"):
formLayout.addRow(lineW)
else:
Expand Down

0 comments on commit 3e171eb

Please sign in to comment.