Remove dynamically hidden configuration frames.

The frames around config options no longer disappear when they contain only one options; instead options appear in frames if they have a "section" option set for them, and not if they don't.

Some things don't, but if we want to put every option in a frame, we can do that now.
This commit is contained in:
Daniel Johnson 2023-12-14 04:22:21 -05:00
parent 87f6706a44
commit e072ce8fdc
2 changed files with 2 additions and 23 deletions

View file

@ -75,7 +75,6 @@ class ConfigBox(VBox):
frame_visible_count = update_widgets(widget.vbox.get_children())
visible_count += frame_visible_count
widget.set_visible(frame_visible_count > 0)
widget.set_frame_visible(frame_visible_count > 1)
else:
widget_visible = self.advanced_visibility or not widget.get_style_context().has_class("advanced")
if widget_visible and filter_text and hasattr(widget, "lutris_option_label"):
@ -720,18 +719,6 @@ class ConfigBox(VBox):
self.add(self.vbox)
self.get_style_context().add_class("section-frame")
def set_frame_visible(self, visible):
if visible:
self.show_frame()
else:
self.hide_frame()
def show_frame(self):
self.get_style_context().remove_class("frame-hidden")
def hide_frame(self):
self.get_style_context().add_class("frame-hidden")
class GameBox(ConfigBox):
config_section = "game"

View file

@ -24,21 +24,13 @@
padding: 3px 6px;
}
.section-frame:not(.frame-hidden) {
.section-frame {
margin-top: 12px;
margin-bottom: 12px;
margin-left: 12px;
margin-right: 12px;
}
.section-frame:not(.frame-hidden) > box {
.section-frame > box {
margin-bottom: 6px;
}
.section-frame.frame-hidden > border {
border: 0px;
}
.section-frame.frame-hidden > label {
font-size: 0px;
}