コード例 #1
0
    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
コード例 #2
0
    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
コード例 #3
0
    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
コード例 #4
0
ファイル: jaas.py プロジェクト: hlakhdari/conjure-up
 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("")),
     ])
コード例 #5
0
ファイル: destroy_confirm.py プロジェクト: johnsca/conjure-up
    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)
コード例 #6
0
    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
コード例 #7
0
ファイル: newcloud.py プロジェクト: EricDoug/conjure-up
    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
コード例 #8
0
 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
コード例 #9
0
ファイル: base.py プロジェクト: darthsuogles/conjure-up
    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'))
コード例 #10
0
ファイル: cloud.py プロジェクト: battlemidget/conjure-up
 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
コード例 #11
0
ファイル: newcloud.py プロジェクト: battlemidget/conjure-up
    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
コード例 #12
0
    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