本文整理汇总了Python中kytten.widgets.Control.layout方法的典型用法代码示例。如果您正苦于以下问题:Python Control.layout方法的具体用法?Python Control.layout怎么用?Python Control.layout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kytten.widgets.Control
的用法示例。
在下文中一共展示了Control.layout方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: layout
# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import layout [as 别名]
def layout(self, x, y):
Control.layout(self, x, y)
if self.swatch is not None:
width, height = self.swatch.get_needed_size(self.content_width, self.content_height)
self.swatch.update(self.x, self.y, width, height)
if self.vlist is not None:
self.vlist.vertices = self._get_vlist_vertices()
if self.swatch_label is not None:
self.swatch_label.layout(x + self.swatch.width + 4, y + (self.height - self.swatch_label.height) / 2)
示例2: layout
# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import layout [as 别名]
def layout(self, x, y):
"""Places the vertex list at the new location.
@param x X coordinate of our lower left corner
@param y Y coordinate of our lower left corner
"""
Control.layout(self, x, y)
if not self.is_disabled():
num_points, self.vertex_list.vertices = self._get_vertices()
self.vertex_list.colors = self.color * num_points
else:
self.is_dragging = False
示例3: layout
# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import layout [as 别名]
def layout(self, x, y):
Control.layout(self, x, y)
self.texture_vlist.vertices = self._get_texture_vertices()
self.resizer_vlist.vertices = self._get_resizer_vertices()
self.limits_vlist.vertices = self._get_limits_vertices()