Skip to content

Commit 05f779a

Browse files
frontend: Use active instead of state property (#3006)
`state` should only be used when the switch is in a working state.
1 parent c1a7143 commit 05f779a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

bottles/frontend/windows/gamescope.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __update(self, config):
7777
self.spin_gamescope_height.set_value(parameters.gamescope_window_height)
7878
self.spin_fps_limit.set_value(parameters.gamescope_fps)
7979
self.spin_fps_limit_no_focus.set_value(parameters.gamescope_fps_no_focus)
80-
self.switch_scaling.set_state(parameters.gamescope_scaling)
80+
self.switch_scaling.set_active(parameters.gamescope_scaling)
8181
self.toggle_borderless.set_active(parameters.gamescope_borderless)
8282
self.toggle_fullscreen.set_active(parameters.gamescope_fullscreen)
8383

@@ -91,7 +91,7 @@ def __idle_save(self, *_args):
9191
"gamescope_window_height": self.spin_gamescope_height.get_value(),
9292
"gamescope_fps": self.spin_fps_limit.get_value(),
9393
"gamescope_fps_no_focus": self.spin_fps_limit_no_focus.get_value(),
94-
"gamescope_scaling": self.switch_scaling.get_state(),
94+
"gamescope_scaling": self.switch_scaling.get_active(),
9595
"gamescope_borderless": self.toggle_borderless.get_active(),
9696
"gamescope_fullscreen": self.toggle_fullscreen.get_active()}
9797

bottles/frontend/windows/vkbasalt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init__(self, parent_window, config, **kwargs):
127127
# If configuration file doesn't exist, set everything to default
128128
else:
129129
self.btn_save.set_sensitive(True)
130-
self.switch_default.set_state(True)
130+
self.switch_default.set_active(True)
131131
self.smaa_edge_detection = "luma"
132132
self.effects_widgets(False)
133133
self.group_effects.set_sensitive(False)
@@ -146,7 +146,7 @@ def __idle_save(self, *args):
146146
conf = ManagerUtils.get_bottle_path(self.config)
147147

148148
# Apply default settings and close the dialog if default setting is enabled
149-
if self.switch_default.get_state() is True:
149+
if self.switch_default.get_active() is True:
150150
VkBasaltSettings.default = True
151151
VkBasaltSettings.output = False
152152
conf = os.path.join(conf, "vkBasalt.conf")

bottles/frontend/windows/vmtouch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ def __init__(self, window, config, **kwargs):
4646
self.__update(config)
4747

4848
def __update(self, config):
49-
self.switch_cache_cwd.set_state(config.Parameters.vmtouch_cache_cwd)
49+
self.switch_cache_cwd.set_active(config.Parameters.vmtouch_cache_cwd)
5050

5151
def __idle_save(self, *_args):
52-
settings = {"vmtouch_cache_cwd": self.switch_cache_cwd.get_state()}
52+
settings = {"vmtouch_cache_cwd": self.switch_cache_cwd.get_active()}
5353

5454
for setting in settings.keys():
5555
self.manager.update_config(

0 commit comments

Comments
 (0)