当前位置: 首页>>代码示例>>Python>>正文


Python Padding.center_20方法代码示例

本文整理汇总了Python中ubuntui.utils.Padding.center_20方法的典型用法代码示例。如果您正苦于以下问题:Python Padding.center_20方法的具体用法?Python Padding.center_20怎么用?Python Padding.center_20使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ubuntui.utils.Padding的用法示例。


在下文中一共展示了Padding.center_20方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def __init__(self, app, cb):
     self.app = app
     self.text = Text("deploying...")
     _pile = [
         Padding.center_79(self.text),
         Padding.line_break(""),
         Padding.center_20(self.buttons())
     ]
     super().__init__(Filler(Pile(_pile), valign="middle"))
开发者ID:battlemidget,项目名称:conjure-up,代码行数:11,代码来源:deploy.py

示例2: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def __init__(self, common, provider, cb):
     self.common = common
     self.provider = provider
     self.text = Text(self.provider.to_yaml())
     _pile = [
         Padding.center_79(self.text),
         Padding.line_break(""),
         Padding.center_20(self.buttons())
     ]
     super().__init__(Filler(Pile(_pile), valign="middle"))
开发者ID:pombredanne,项目名称:conjure,代码行数:12,代码来源:deploy.py

示例3: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def __init__(self, cb):
     self.cb = cb
     self.fname_id_map = {}
     self.current_focus = 2
     _pile = [
         Padding.line_break(""),
         Padding.center_90(self.build_menuable_items()),
         Padding.line_break(""),
         Padding.center_20(self.buttons())
     ]
     super().__init__(Filler(Pile(_pile), valign="top"))
开发者ID:battlemidget,项目名称:conjure-up,代码行数:13,代码来源:variant.py

示例4: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def __init__(self, common, cb):
     self.common = common
     self.cb = cb
     _pile = [
         Padding.center_90(Text("Choose a solution to get started:")),
         Padding.center_90(Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}")),
         Padding.center_90(self.build_menuable_items()),
         Padding.line_break(""),
         Padding.center_20(self.buttons())
     ]
     super().__init__(ListBox(_pile))
开发者ID:pombredanne,项目名称:conjure,代码行数:13,代码来源:welcome.py

示例5: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
    def __init__(self, app, steps, cb=None):
        """ init

        Arguments:
        cb: process step callback
        """
        self.app = app
        self.table = Table()
        self.cb = cb

        self.steps_queue = steps
        for step_model in self.steps_queue:
            step_widget = self.add_step_widget(step_model)
            self.table.addColumns(
                step_model.path,
                [
                    ('fixed', 3, step_widget['icon']),
                    step_widget['description'],
                ]
            )
            # Need to still prompt for the user to submit
            # even though no questions are asked
            if len(step_widget['additional_input']) == 0:
                self.table.addRow(
                    Padding.right_20(
                        Color.button_primary(
                            submit_btn(on_press=self.submit,
                                       user_data=(step_model, step_widget)),
                            focus_map='button_primary focus')), False)
            for i in step_widget['additional_input']:
                self.table.addRow(Padding.line_break(""), False)
                self.table.addColumns(
                    step_model.path,
                    [
                        ('weight', 0.5, Padding.left(i['label'], left=5)),
                        ('weight', 1, Color.string_input(
                            i['input'],
                            focus_map='string_input focus')),
                    ], force=True
                )
                self.table.addRow(
                    Padding.right_20(
                        Color.button_primary(
                            submit_btn(
                                on_press=self.submit,
                                user_data=(step_model, step_widget)),
                            focus_map='button_primary focus')), False)
                self.table.addRow(Padding.line_break(""), False)

        self.table.addRow(Padding.center_20(
                        Color.button_primary(
                            done_btn(on_press=self.done, label="View Summary"),
                            focus_map='button_primary focus')))
        super().__init__(Padding.center_80(self.table.render()))
开发者ID:benluteijn,项目名称:conjure-up,代码行数:56,代码来源:steps.py

示例6: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def __init__(self, app, cloud, schema, cb):
     self.app = app
     self.cloud = cloud
     self.input_items = schema
     self.cb = cb
     _pile = [
         Padding.center_60(Instruction(
             "Enter your {} credentials:".format(self.cloud.upper()))),
         Padding.center_60(HR()),
         Padding.center_60(self.build_inputs()),
         Padding.line_break(""),
         Padding.center_20(self.buttons())
     ]
     super().__init__(Filler(Pile(_pile), valign="top"))
开发者ID:benluteijn,项目名称:conjure-up,代码行数:16,代码来源:newcloud.py

示例7: _build_widget

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def _build_widget(self):
     total_items = [
         Padding.center_60(Text(self.title, align="center")),
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1))
     ]
     for item in self.radio_items.keys():
         opt = self.radio_items[item]
         col = Columns([opt])
         total_items.append(Padding.center_60(col))
     total_items.append(
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)))
     total_items.append(Padding.center_20(self._build_buttons()))
     return Filler(Pile(total_items), valign='middle')
开发者ID:Ubuntu-Solutions-Engineering,项目名称:openstack-installer,代码行数:17,代码来源:selectordialog.py

示例8: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def __init__(self, error):
     body = [
         Padding.center_60(
             Text("Oops, there was a problem with your install:",
                  align="center")),
         Padding.center_95(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)),
         Padding.center_85(Text("Reason:")),
         Padding.center_80(Color.error_major(Text(error))),
         Padding.line_break(""),
         Padding.line_break(""),
         Padding.center_95(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)),
         Padding.center_20(self._build_buttons())
     ]
     super().__init__(Filler(Pile(body), valign="middle"))
开发者ID:Ubuntu-Solutions-Engineering,项目名称:urwid-ubuntu,代码行数:18,代码来源:error.py

示例9: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def __init__(self, app, cb):
     self.app = app
     self.input_items = NETWORK
     self.cb = cb
     _pile = [
         # Padding.center_60(Instruction(
         #     "Enter LXD information:")),
         Padding.center_60(Instruction(
             "Please configure networking for LXD"
         )),
         Padding.center_60(HR()),
         Padding.center_60(self.build_info()),
         Padding.line_break(""),
         Padding.center_20(self.buttons())
     ]
     super().__init__(Filler(Pile(_pile), valign="middle"))
开发者ID:benluteijn,项目名称:conjure-up,代码行数:18,代码来源:lxdsetup.py

示例10: __init__

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
    def __init__(self, app, steps, cb=None):
        """ init

        Arguments:
        cb: process step callback
        """
        self.app = app
        self.cb = cb
        self.steps = steps
        self.step_pile = Pile(
            [Padding.center_90(HR()),
             Padding.line_break("")] +
            [Padding.center_90(s) for s in self.steps] +
            [Padding.line_break(""),
             Padding.center_20(self.buttons())]
        )
        super().__init__(Filler(self.step_pile, valign="top"))
开发者ID:battlemidget,项目名称:conjure-up,代码行数:19,代码来源:steps.py

示例11: _build_widget

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
    def _build_widget(self):
        total_items = [
            Padding.center_60(HR())
        ]
        for spell in self.spells:
            total_items.append(Padding.center_60(
                Color.body(
                    menu_btn(label=spell,
                             on_press=self.submit),
                    focus_map='menu_button focus'
                )
            ))

        total_items.append(
            Padding.center_60(HR()))
        total_items.append(Padding.center_20(self._build_buttons()))
        return Filler(Pile(total_items), valign='top')
开发者ID:tych0,项目名称:conjure-up,代码行数:19,代码来源:spellpicker.py

示例12: _build_widget

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
    def _build_widget(self):
        total_items = [
            Padding.center_60(Instruction("Choose a Cloud")),
            Padding.center_60(HR())
        ]
        for item in self.clouds:
            total_items.append(Padding.center_60(
                Color.body(
                    menu_btn(label=item,
                             on_press=self.submit),
                    focus_map='menu_button focus'
                )
            ))

        total_items.append(
            Padding.center_60(HR()))
        total_items.append(Padding.center_20(self._build_buttons()))
        return Filler(Pile(total_items), valign='top')
开发者ID:benluteijn,项目名称:conjure-up,代码行数:20,代码来源:cloud.py

示例13: buttons

# 需要导入模块: from ubuntui.utils import Padding [as 别名]
# 或者: from ubuntui.utils.Padding import center_20 [as 别名]
 def buttons(self):
     self.button = Color.button_primary(
         done_btn(on_press=self.done, label="View Summary"),
         focus_map='button_primary focus')
     return Padding.center_20(self.button)
开发者ID:conjure-up,项目名称:conjure-up,代码行数:7,代码来源:steps.py


注:本文中的ubuntui.utils.Padding.center_20方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。