def build_footer(self): cancel = menu_btn(on_press=self.do_cancel, label="\n BACK\n") confirm = menu_btn(on_press=self.do_commit, label="\n APPLY CHANGES\n") self.buttons = Columns([ ('fixed', 2, Text("")), ('fixed', 13, Color.menu_button( cancel, focus_map='button_primary focus')), Text(""), ('fixed', 20, Color.menu_button( confirm, focus_map='button_primary focus')), ('fixed', 2, Text("")) ]) footer = Pile([ HR(top=0), Padding.center_90(self.description_w), Padding.line_break(""), Color.frame_footer(Pile([ Padding.line_break(""), self.buttons])) ]) return footer
def build_footer(self): cancel = menu_btn(on_press=self.do_cancel, label="\n BACK\n") self.apply_button = menu_btn(on_press=self.do_commit, label="\n APPLY\n") self.buttons = Columns([ ('fixed', 2, Text("")), ('fixed', 13, Color.menu_button( cancel, focus_map='button_primary focus')), Text(""), ('fixed', 20, Color.menu_button( self.apply_button, focus_map='button_primary focus')), ('fixed', 2, Text("")) ]) footer = Pile([ HR(top=0), Padding.center_90(self.description_w), Padding.line_break(""), Color.frame_footer(Pile([ Padding.line_break(""), self.buttons])) ]) return footer
def build_footer(self): cancel = menu_btn(on_press=self.do_cancel, label="\n BACK\n") self.apply_button = menu_btn(on_press=self.do_done, label="\n DONE\n") self.buttons = Columns([ ('fixed', 2, Text("")), ('fixed', 13, Color.menu_button( cancel, focus_map='button_primary focus')), Text(""), ('fixed', 20, Color.menu_button( self.apply_button, focus_map='button_primary focus')), ('fixed', 2, Text("")) ]) footer = Pile([ HR(top=0), Padding.line_break(""), Color.frame_footer(Pile([ Padding.line_break(""), self.buttons])) ]) return footer
def _build_buttons(self): return Columns([ ('fixed', 2, Text("")), ('fixed', 13, Color.menu_button(menu_btn(on_press=self.cancel, label="\n QUIT\n"), focus_map='button_primary focus')), Text(""), ('fixed', 13, Color.menu_button(menu_btn(on_press=self.login, label="\n LOGIN\n"), focus_map='button_primary focus')), ('fixed', 2, Text("")), ])
def _build_footer(self): no = menu_btn(on_press=self.cancel, label="\n NO\n") yes = menu_btn(on_press=self.submit, label="\n YES\n") self.buttons = Columns([ ('fixed', 2, Text("")), ('fixed', 11, Color.menu_button(no, focus_map='button_primary focus')), Text(""), ('fixed', 11, Color.menu_button(yes, focus_map='button_primary focus')), ('fixed', 2, Text("")) ]) self.footer = Pile([Padding.line_break(""), self.buttons]) return Color.frame_footer(self.footer)
def build_footer(self): # cancel = menu_btn(on_press=self.cancel, # label="\n BACK\n") self.buttons = Columns([ ('fixed', 2, Text("")), # ('fixed', 13, Color.menu_button( # cancel, # focus_map='button_primary focus')), Text(""), ('fixed', 40, Color.menu_button( self.skip_rest_button, focus_map='button_primary focus' )), ('fixed', 2, Text("")) ]) footer = Pile([ HR(top=0), Padding.center_90(self.description_w), Padding.line_break(""), Color.frame_footer(Pile([ Padding.line_break(""), self.buttons])) ]) return footer
def _build_footer(self): cancel = menu_btn(on_press=self.cancel, label="\n BACK\n") confirm = menu_btn(on_press=self.submit, label="\n ADD CREDENTIAL\n") self.buttons = Columns([ ('fixed', 2, Text("")), ('fixed', 13, Color.menu_button(cancel, focus_map='button_primary focus')), Text(""), ('fixed', 20, Color.menu_button(confirm, focus_map='button_primary focus')), ('fixed', 2, Text("")) ]) footer = Color.frame_footer( Pile([Padding.line_break(""), self.buttons])) return footer
def _build_buttons(self): cancel = menu_btn(on_press=self.cancel, label="\n QUIT\n") buttons = [ Padding.line_break(""), Color.menu_button(cancel, focus_map='button_primary focus'), ] self.buttons_pile = Pile(buttons) return self.buttons_pile
def button(self, label, callback): """ Build a button for the footer with the given label and callback. """ return ('fixed', len(label) + 8, Color.menu_button(menu_btn(on_press=callback, label="\n {}\n".format(label)), focus_map='button_primary focus'))
def _build_footer(self): cancel = menu_btn(on_press=self.cancel, label="\n BACK\n") confirm = menu_btn(on_press=self.submit, label="\n ADD CREDENTIAL\n") self.buttons = Columns([ ('fixed', 2, Text("")), ('fixed', 13, Color.menu_button( cancel, focus_map='button_primary focus')), Text(""), ('fixed', 20, Color.menu_button( confirm, focus_map='button_primary focus')), ('fixed', 2, Text("")) ]) footer = Color.frame_footer(Pile([ Padding.line_break(""), self.buttons ])) return footer
def build_footer(self): # cancel = menu_btn(on_press=self.cancel, # label="\n BACK\n") self.buttons = Columns([ ('fixed', 2, Text("")), # ('fixed', 13, Color.menu_button( # cancel, # focus_map='button_primary focus')), Text(""), ('fixed', 40, Color.menu_button(self.skip_rest_button, focus_map='button_primary focus')), ('fixed', 2, Text("")) ]) footer = Pile([ HR(top=0), Padding.center_90(self.description_w), Padding.line_break(""), Color.frame_footer(Pile([Padding.line_break(""), self.buttons])) ]) return footer