mirror of
https://github.com/lutris/lutris
synced 2024-10-14 19:53:53 +00:00
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:
parent
87f6706a44
commit
e072ce8fdc
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue