本文整理汇总了Python中ubuntui.utils.Color.menu_button方法的典型用法代码示例。如果您正苦于以下问题:Python Color.menu_button方法的具体用法?Python Color.menu_button怎么用?Python Color.menu_button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ubuntui.utils.Color
的用法示例。
在下文中一共展示了Color.menu_button方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: build_footer
# 需要导入模块: from ubuntui.utils import Color [as 别名]
# 或者: from ubuntui.utils.Color import menu_button [as 别名]
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: build_footer
# 需要导入模块: from ubuntui.utils import Color [as 别名]
# 或者: from ubuntui.utils.Color import menu_button [as 别名]
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
示例3: build_footer
# 需要导入模块: from ubuntui.utils import Color [as 别名]
# 或者: from ubuntui.utils.Color import menu_button [as 别名]
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
示例4: _build_buttons
# 需要导入模块: from ubuntui.utils import Color [as 别名]
# 或者: from ubuntui.utils.Color import menu_button [as 别名]
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
示例5: _build_footer
# 需要导入模块: from ubuntui.utils import Color [as 别名]
# 或者: from ubuntui.utils.Color import menu_button [as 别名]
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