mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-28 20:36:55 -06:00
#826: doc comments for draw and main_toolbar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -421,6 +421,7 @@ pub fn paint(painter: &Painter, rect: Rect, icon: Icon, color: Color32) {
|
||||
draw(&p, icon);
|
||||
}
|
||||
|
||||
/// Draw `icon` on the 16-unit grid through `p`, which maps grid units to the target box.
|
||||
fn draw(p: &P, icon: Icon) {
|
||||
use Icon::*;
|
||||
match icon {
|
||||
|
||||
@@ -94,6 +94,8 @@ pub(crate) fn main_width() -> f32 {
|
||||
GROUPS.len() as f32 * (cell + gap) + gap * 10.0 + 2.0 * (cell + gap) + 16.0 + 4.0 * 34.0 + 24.0
|
||||
}
|
||||
|
||||
/// The main toolbar pill: the tool groups with their flyouts, Resources and Actions, then the
|
||||
/// Draw · Design · Prototype · Inspect mode switcher.
|
||||
fn main_toolbar(app: &mut FigApp, ui: &mut Ui, canvas: Rect, t: &Tokens) {
|
||||
let (cell, gap) = (32.0, 4.0);
|
||||
let width = main_width();
|
||||
|
||||
Reference in New Issue
Block a user