def add_divider(self): # , top_margin=10, bottom_margin=10): OptionUI.add_divider( self, self.layout, # top_margin=top_margin, # bottom_margin=bottom_margin, )
def add_database_option(self, platform, name, description=""): # self.options_on_page.add(name) group = OptionUI.create_group( self, name, description=description, help_button=False ) if self.hori_counter % 2 == 0: self.hori_layout = HorizontalLayout() self.layout.add( self.hori_layout, fill=True, margin_top=10, margin_bottom=10, margin_left=-10, margin_right=-10, ) self.hori_layout.add( group, fill=True, expand=-1, margin=10, margin_top=0, margin_bottom=0, ) self.hori_layout.add( PlatformSettingsButton(self, platform), margin_right=10 ) if self.hori_counter % 2 == 0: self.hori_layout.add_spacer(0) self.hori_counter += 1
def add_option(name): self.layout.add( OptionUI.create_group(self, name), fill=True, margin_top=10, margin_bottom=10, )
def __init__( self, optionName: str, title: str = None, description: str = None, style=None, ): defaultStyle = {"padding": 10} if style is not None: defaultStyle.update(style) super().__init__(style=defaultStyle) parent = ParentStack.top() optionsOnPanel = None while parent and optionsOnPanel is None: parent = parent.getParent() optionsOnPanel = getattr(parent, "optionsOnPanel", None) if optionsOnPanel is not None: optionsOnPanel.add(optionName) with self: self.layout.add(OptionUI.create_group( self, optionName, title, ), ) if description is not None: Text(description, style={"marginTop": 10})
def add_database_option(self, platform, name, description=""): self.options_on_page.add(name) group = OptionUI.create_group( self, name, description=description, help_button=False ) if self.hori_counter % 2 == 0: self.hori_layout = fsui.HorizontalLayout() self.layout.add( self.hori_layout, fill=True, margin_top=10, margin_bottom=10, margin_left=-10, margin_right=-10, ) self.hori_layout.add( group, fill=True, expand=-1, margin=10, margin_top=0, margin_bottom=0, ) self.hori_layout.add( PlatformSettingsButton(self, platform), margin_right=10 ) if self.hori_counter % 2 == 0: self.hori_layout.add_spacer(0) self.hori_counter += 1
def add_option(self, layout, option, platforms=None, text=""): panel = fsui.Panel(self) panel.layout = fsui.VerticalLayout() panel.layout.add( OptionUI.create_group( panel, option, text, thin=False, help_button=True ), fill=True, ) layout.add(panel, fill=True, margin_bottom=10)
def add_option(self, layout, option, platforms=None, text=""): panel = fsui.Panel(self) panel.layout = fsui.VerticalLayout() panel.layout.add(OptionUI.create_group(panel, option, text, thin=False, help_button=True), fill=True) layout.add(panel, fill=True, margin_bottom=10)
def add_option(self, name, description="", margin_top=10, warnings=None): group = OptionUI.create_group(self, name, description=description, warnings=warnings) self.layout.add(group, fill=True, margin_top=margin_top, margin_bottom=10) # self.options_on_page.add(name) return group
def add_option(self, option, platforms=None, enable=None, text=""): panel = fsui.Panel(self) panel.layout = fsui.VerticalLayout() panel.layout.add( OptionUI.create_group( panel, option, text, thin=True, help_button=False), fill=True) self.layout.add(panel, fill=True, margin=10) if platforms: PlatformShowBehavior(panel, platforms) elif enable: PlatformEnableBehavior(panel, enable)
def add_option(self, option, platforms=None, enable=None, text=""): panel = fsui.Panel(self) panel.layout = fsui.VerticalLayout() panel.layout.add( OptionUI.create_group( panel, option, text, thin=True, help_button=False ), fill=True, ) self.layout.add(panel, fill=True, margin=10) if platforms: PlatformShowBehavior(panel, platforms) elif enable: PlatformEnableBehavior(panel, enable)
def create_option_label(self, parent, label): return OptionUI.create_option_label(parent, label)
def add_option(self, name, description=""): group = OptionUI.create_group(self, name, description=description) self.layout.add(group, fill=True, margin_top=10, margin_bottom=10) self.options_on_page.add(name) return group