Repository navigation
Bern 0.1.1
Progress rings, saving pictures to the user's photos, and pages that move across an iPhone's window without leaving a strip behind.
What's new
Progress(style: ring)draws progress as an arc in the accent color: from the top, clockwise, with round ends,widthacross andstroke_widththick, and a dot at the top before anything has arrived. It takes no input, so it can lie over a button in aStackand ring the button's own symbol. On every platform.bern::platform::save_image(path)saves a PNG or JPEG where the system keeps the user's photos, for other apps to pick from. Turn it on with[app].photos = true: iOS then asks the user the first time, with the reason in each supported language; Android 10 and later need no permission.refusedmeans the user did not allow it.- Pages that move across an iPhone's window (
appear/disappearwith amovetransition, such as a player page rising from the bottom) now cover the window under its bars all the way: no strip is left at the bottom when one has risen, the page stops at the top instead of overshooting, and one that sinks is gone at once instead of lingering at the bottom edge.
Install
cargo binstall bern-cli@0.1.1Apps pin the same version: bern = "=0.1.1". The files below are the bern command for each computer, as in 0.1.0.
进度环、把图片存到相册,以及在 iPhone 上移过窗口时不再留下一条的页面。
新增
Progress(style: ring)把进度画成主题色的一段弧:从顶部顺时针,两头是圆的,直径width、粗stroke_width;还没开始时是顶部的一个点。它不接收输入,可以在Stack里压在按钮上,圈住按钮自己的符号。所有平台都支持。bern::platform::save_image(path)把一张 PNG 或 JPEG 存到系统保存用户照片的地方,供其他应用选用。用[app].photos = true打开:iOS 第一次会询问用户,原因按每种支持的语言写好;Android 10 及以上不需要权限。refused表示用户没有允许。- 在 iPhone 上移过窗口的页面(用
move过渡的appear/disappear,例如从底部升起的播放页)现在全程铺满窗口、伸到栏下:升起后底部不再露出一条,停在顶部不会冲过头,收起时立刻离开,不再在底边停留。
安装
cargo binstall bern-cli@0.1.1应用固定同一个版本:bern = "=0.1.1"。下面的文件是各种电脑上的 bern 命令,与 0.1.0 相同。