makepad-reference

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Makepad Reference

Makepad参考资料

This category provides reference materials for debugging, code quality, and advanced layout patterns.
本分类提供调试、代码质量和高级布局模式相关的参考资料。

Quick Navigation

快速导航

TopicFileUse When
API DocumentationOfficial docs index, quick API referenceFinding detailed API info
TroubleshootingCommon errors and fixesBuild fails, runtime errors
Code QualityMakepad-aware refactoringSimplifying code safely
Adaptive LayoutDesktop/mobile responsiveCross-platform layouts
主题文件使用场景
API文档官方文档索引,快速API参考查找详细API信息
故障排查常见错误与修复方案构建失败、运行时错误
代码质量针对Makepad的重构指南安全简化代码
自适应布局桌面/移动端响应式布局跨平台布局开发

Common Issues Quick Reference

常见问题速查

ErrorQuick Fix
no matching field: font
Use
text_style: <THEME_FONT_*>{}
Color parse error (ends in
e
)
Change last digit (e.g.,
#14141e
#14141f
)
set_text
missing argument
Add
cx
as first argument
UI not updatingCall
redraw(cx)
after changes
Widget not foundCheck ID spelling, use
ids!()
for paths
错误快速修复方案
no matching field: font
使用
text_style: <THEME_FONT_*>{}
颜色解析错误(以
e
结尾)
修改最后一位数字(例如:
#14141e
#14141f
set_text
参数缺失
添加
cx
作为第一个参数
UI未更新修改后调用
redraw(cx)
Widget未找到检查ID拼写,使用
ids!()
获取路径

Debug Tips

调试技巧

bash
undefined
bash
undefined

Run with line info for better error messages

运行时启用行信息以获取更清晰的错误提示

MAKEPAD=lines cargo +nightly run

```rust
// Add logging
log!("Value: {:?}", my_value);
log!("State: {} / {}", self.counter, self.is_loading);
MAKEPAD=lines cargo +nightly run

```rust
// 添加日志
log!("值: {:?}", my_value);
log!("状态: {} / {}", self.counter, self.is_loading);

Resources

资源