[Refactor] メイン画面の閉じるボタンを押したときの処理をCALLBACK関数にしてview.pyに移動。

This commit is contained in:
Sakamoto Shiina
2023-10-23 15:35:25 +09:00
parent 4526c2a28e
commit 78c9a290cc
2 changed files with 3 additions and 1 deletions

View File

@@ -85,6 +85,8 @@ class View():
CALLBACK_RESTART_SOFTWARE=None,
CALLBACK_UPDATE_SOFTWARE=None,
CALLBACK_QUIT_VRCT=vrct_gui._quitVRCT,
CALLBACK_WHEN_DETECT_WINDOW_OVERED_SIZE=self._showDisplayOverUiSizeConfirmationModal,
# Confirmation Modal

View File

@@ -6,7 +6,7 @@ from utils import callFunctionIfCallable
from ..ui_utils import createButtonWithImage, getImagePath, bindButtonFunctionAndColor
def createMainWindowWidgets(vrct_gui, settings, view_variable):
vrct_gui.protocol("WM_DELETE_WINDOW", vrct_gui._quitVRCT)
vrct_gui.protocol("WM_DELETE_WINDOW", lambda: callFunctionIfCallable(view_variable.CALLBACK_QUIT_VRCT))
vrct_gui.iconbitmap(getImagePath("vrct_logo_mark_black.ico"))