mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
...
This commit is contained in:
parent
7b588d8def
commit
2a9b2488ff
@ -594,7 +594,6 @@ class dialog_setting_game_internal(QWidget):
|
||||
def __init__(self, parent, exepath) -> None:
|
||||
super().__init__(parent)
|
||||
vbox = QVBoxLayout(self)
|
||||
vbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.setLayout(vbox)
|
||||
formLayout = QFormLayout()
|
||||
self.exepath = exepath
|
||||
@ -1235,12 +1234,12 @@ class dialog_setting_game(QDialog):
|
||||
l = QHBoxLayout(self)
|
||||
self.setLayout(l)
|
||||
l.addWidget(_)
|
||||
|
||||
l.setContentsMargins(0,0,0,0)
|
||||
self.show()
|
||||
try:
|
||||
self.setGeometry(
|
||||
calculate_centered_rect(
|
||||
_global_dialog_savedgame_new.geometry(), self.size()
|
||||
_global_dialog_savedgame_new.parent().parent().geometry(), self.size()
|
||||
)
|
||||
)
|
||||
except:
|
||||
@ -2249,8 +2248,7 @@ class dialog_savedgame_v3(QWidget):
|
||||
tabadd_lazy(
|
||||
self.righttop,
|
||||
savehook_new_data[k]["title"],
|
||||
lambda v: v.addWidget(dialog_setting_game_internal(self, k)),
|
||||
margin0=False,
|
||||
lambda v: v.addWidget(dialog_setting_game_internal(self, k))
|
||||
)
|
||||
|
||||
except:
|
||||
|
@ -853,12 +853,11 @@ class threebuttons(QWidget):
|
||||
layout.addWidget(button3)
|
||||
|
||||
|
||||
def tabadd_lazy(tab, title, getrealwidgetfunction, margin0=True):
|
||||
def tabadd_lazy(tab, title, getrealwidgetfunction):
|
||||
q = QWidget()
|
||||
v = QVBoxLayout()
|
||||
q.setLayout(v)
|
||||
if margin0:
|
||||
v.setContentsMargins(0, 0, 0, 0)
|
||||
v.setContentsMargins(0, 0, 0, 0)
|
||||
q.lazyfunction = functools.partial(getrealwidgetfunction, v)
|
||||
tab.addTab(q, title)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user