[Update] Main Window: Add Restore the main window position feature. VRCT終了時(メイン画面のXを押した時)の画面位置とサイズを記録し、次回起動時に同じ場所同じサイズで表示させる機能を追加。デフォルトでオンです。

※次回アプデ後の初期起動時はみんな、一番左上端座標x-0 y-0で表示されます。この設定をオフにすると常に画面中央(今まで通り)に表示されます。
This commit is contained in:
Sakamoto Shiina
2023-12-30 17:25:29 +09:00
parent 4eeb76f9fb
commit 38edeaebf3
8 changed files with 105 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ def createSettingBox_Appearance(setting_box_wrapper, config_window, settings, vi
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
createSettingBoxDropdownMenu = sbg.createSettingBoxDropdownMenu
createSettingBoxSlider = sbg.createSettingBoxSlider
createSettingBoxCheckbox = sbg.createSettingBoxCheckbox
# 関数名は変えるかもしれない。
# テーマ変更、フォント変更時、 Widget再生成か再起動かは検討中
@@ -30,6 +31,8 @@ def createSettingBox_Appearance(setting_box_wrapper, config_window, settings, vi
def optionmenu_ui_language_callback(value):
callFunctionIfCallable(view_variable.CALLBACK_SET_UI_LANGUAGE, value)
def checkbox_enable_restore_main_window_geometry_callback(checkbox_box_widget):
callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_RESTORE_MAIN_WINDOW_GEOMETRY, checkbox_box_widget.get())
row=0
config_window.sb__transparency = createSettingBoxSlider(
@@ -119,5 +122,15 @@ def createSettingBox_Appearance(setting_box_wrapper, config_window, settings, vi
command=lambda value: optionmenu_ui_language_callback(value),
variable=view_variable.VAR_UI_LANGUAGE,
)
config_window.sb__ui_language.grid(row=row, pady=0)
config_window.sb__ui_language.grid(row=row)
row+=1
config_window.sb__enable_restore_main_window_geometry = createSettingBoxCheckbox(
for_var_label_text=view_variable.VAR_LABEL_ENABLE_RESTORE_MAIN_WINDOW_GEOMETRY,
for_var_desc_text=view_variable.VAR_DESC_ENABLE_RESTORE_MAIN_WINDOW_GEOMETRY,
checkbox_attr_name="sb__checkbox_enable_restore_main_window_geometry",
command=lambda: checkbox_enable_restore_main_window_geometry_callback(config_window.sb__checkbox_enable_restore_main_window_geometry),
variable=view_variable.VAR_ENABLE_RESTORE_MAIN_WINDOW_GEOMETRY,
)
config_window.sb__enable_restore_main_window_geometry.grid(row=row, pady=0)
row+=1