diff --git a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py index c412f3f9..3f216cf7 100644 --- a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py +++ b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py @@ -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: diff --git a/LunaTranslator/LunaTranslator/gui/usefulwidget.py b/LunaTranslator/LunaTranslator/gui/usefulwidget.py index dbacfa12..1c089335 100644 --- a/LunaTranslator/LunaTranslator/gui/usefulwidget.py +++ b/LunaTranslator/LunaTranslator/gui/usefulwidget.py @@ -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)