[Add] Main Window: Language Settings. 言語選択ボタンを押して言語選択ウィンドウ開閉時に、矢印の向きが反転するように。

[Bugfix] 根本的な解決ではないけれど、言語選択ウィンドウの開く位置が固定されてしまうのでその修正(サイドバーの幅は可変なので、それに合わせてウィンドウ生成時に毎回位置を指定)
This commit is contained in:
Sakamoto Shiina
2023-09-09 11:35:24 +09:00
parent 5222f7cc68
commit 9f9cd1e64c
3 changed files with 49 additions and 24 deletions

View File

@@ -25,7 +25,7 @@ class _CreateSelectableLanguagesWindow(CTkToplevel):
self.settings = settings
self._view_variable = view_variable
self.bind("<FocusOut>", lambda e: self.withdraw())
self.bind("<FocusOut>", lambda e: vrct_gui.closeSelectableLanguagesWindow())
@@ -36,6 +36,16 @@ class _CreateSelectableLanguagesWindow(CTkToplevel):
def createContainer(self, selectable_language_window_type):
self.selectable_language_window_type = selectable_language_window_type
self.x_pos = self.attach.winfo_rootx()
self.y_pos = self.attach.winfo_rooty()
self.width_new = self.attach.winfo_width()
self.height_new = self.attach.winfo_height()
self.geometry('+{}+{}'.format(self.x_pos, self.y_pos))
if self.is_created is True:
pass
else:
@@ -52,20 +62,13 @@ class _CreateSelectableLanguagesWindow(CTkToplevel):
callFunctionIfCallable(callback, value)
target_variable.set(value)
self.withdraw()
self.vrct_gui.closeSelectableLanguagesWindow()
def _createContainer(self):
self.x_pos = self.attach.winfo_rootx()
self.y_pos = self.attach.winfo_rooty()
self.width_new = self.attach.winfo_width()
self.height_new = self.attach.winfo_height()
self.geometry('+{}+{}'.format(self.x_pos, self.y_pos))
# self.geometry('{}x{}+{}+{}'.format(self.width_new, self.height_new, self.x_pos, self.y_pos))
# self.geometry('{}x{}+{}+{}'.format(self.width_new, self.height_new, self.x_pos, self.y_pos))
@@ -94,7 +97,7 @@ class _CreateSelectableLanguagesWindow(CTkToplevel):
)
self.go_back_button_label.grid(row=1, column=0, padx=10, pady=10)
bindButtonReleaseFunction([self.go_back_button_label_wrapper, self.go_back_button_label], lambda _e: self.withdraw())
bindButtonReleaseFunction([self.go_back_button_label_wrapper, self.go_back_button_label], lambda _e: self.vrct_gui.closeSelectableLanguagesWindow())