[Chore] 関数名変更 updateConfigWindowTransparency -> setMainWindowTransparency

設定画面からCALLBACKで呼ばれて扱う関数ではあるものの、実際に影響するのは今のところメイン画面だけなのでそういう意味での変更と、
view.pyでconfigから値を読み込んでいたのを、引数で渡してそれをただセットする関数に変更。そのため名前はupdateではなくsetに。
This commit is contained in:
Sakamoto Shiina
2023-09-06 04:18:14 +09:00
parent 10b22d9aa3
commit 83fab83f5b
2 changed files with 4 additions and 5 deletions

View File

@@ -222,7 +222,7 @@ def callbackDisableConfigWindowCompactMode():
def callbackSetTransparency(value): def callbackSetTransparency(value):
print("callbackSetTransparency", int(value)) print("callbackSetTransparency", int(value))
config.TRANSPARENCY = int(value) config.TRANSPARENCY = int(value)
view.updateConfigWindowTransparency() view.setMainWindowTransparency(config.TRANSPARENCY/100)
def callbackSetAppearance(value): def callbackSetAppearance(value):
print("callbackSetAppearance", value) print("callbackSetAppearance", value)

View File

@@ -405,6 +405,9 @@ class View():
def clearMessageBox(self): def clearMessageBox(self):
vrct_gui.entry_message_box.delete(0, CTK_END) vrct_gui.entry_message_box.delete(0, CTK_END)
@staticmethod
def setMainWindowTransparency(transparency:float):
vrct_gui.wm_attributes("-alpha", transparency)
@@ -416,10 +419,6 @@ class View():
# Config Window # Config Window
@staticmethod
def updateConfigWindowTransparency():
vrct_gui.wm_attributes("-alpha", config.TRANSPARENCY/100)
def setConfigWindowCompactModeSwitchStatusToDisabled(self): def setConfigWindowCompactModeSwitchStatusToDisabled(self):
vrct_gui.config_window.setting_box_compact_mode_switch_box.configure(state="disabled") vrct_gui.config_window.setting_box_compact_mode_switch_box.configure(state="disabled")