@@ -106,13 +106,13 @@ func _on_window_base_size_item_selected(index: int) -> void:
106
106
7 : # 1680×720 (21:9)
107
107
base_window_size = Vector2 (1680 , 720 )
108
108
109
- get_viewport ().content_scale_size = base_window_size
109
+ get_window ().content_scale_size = base_window_size
110
110
update_container .call_deferred ()
111
111
112
112
113
113
func _on_window_stretch_mode_item_selected (index : int ) -> void :
114
114
stretch_mode = index as Window .ContentScaleMode
115
- get_viewport ().content_scale_mode = stretch_mode
115
+ get_window ().content_scale_mode = stretch_mode
116
116
117
117
# Disable irrelevant options when the stretch mode is Disabled.
118
118
$ "Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowBaseSize/OptionButton" .disabled = stretch_mode == Window .CONTENT_SCALE_MODE_DISABLED
@@ -121,14 +121,14 @@ func _on_window_stretch_mode_item_selected(index: int) -> void:
121
121
122
122
func _on_window_stretch_aspect_item_selected (index : int ) -> void :
123
123
stretch_aspect = index as Window .ContentScaleAspect
124
- get_viewport ().content_scale_aspect = stretch_aspect
124
+ get_window ().content_scale_aspect = stretch_aspect
125
125
126
126
127
127
func _on_window_scale_factor_drag_ended (_value_changed : bool ) -> void :
128
128
scale_factor = $ "Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowScaleFactor/HSlider" .value
129
129
$ "Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowScaleFactor/Value" .text = "%d%% " % (scale_factor * 100 )
130
- get_viewport ().content_scale_factor = scale_factor
130
+ get_window ().content_scale_factor = scale_factor
131
131
132
132
133
133
func _on_window_stretch_scale_mode_item_selected (index : int ) -> void :
134
- get_viewport ().content_scale_stretch = index
134
+ get_window ().content_scale_stretch = index
0 commit comments