SkChessView.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:pythonista-scripts 作者: khilnani 项目源码 文件源码
def screen_frames(status_height=24):
    w, h = ui.get_screen_size()  # (1024, 768) on iPad in landscape mode
    assert w > h, 'This app only works in landscape mode!!'
    square_side = min(w, h) - status_height  # make room for a line of status text
    panel_width = (w - square_side) / 2
    center_frame = sk.Rect(panel_width, 0, square_side, square_side)
    left_frame   = sk.Rect(0, 0, panel_width, square_side)
    right_frame  = sk.Rect(panel_width + square_side, 0, panel_width, square_side)
    status_frame = sk.Rect(0, square_side, w, status_height)
    return center_frame, left_frame, right_frame, status_frame

#print(screen_frames())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号