| Crates.io | egui-scale |
| lib.rs | egui-scale |
| version | 0.2.0 |
| created_at | 2025-03-31 10:42:38.652588+00 |
| updated_at | 2025-07-14 10:15:26.205427+00 |
| description | Egui scaling library |
| homepage | https://github.com/zakarumych/egui-scale |
| repository | https://github.com/zakarumych/egui-scale |
| max_upload_size | |
| id | 1613258 |
| size | 18,759 |
egui-scale is a Rust library that provides a trait for applying scale transformations to various types used in the egui GUI framework. This library is designed to make it easy to scale UI elements consistently across your application.
EguiScale trait can be implemented for any type, allowing flexible scaling.EguiScale implementations for common egui types, such as:
Vec2MarginStrokeVisualsStyleEguiScale trait for your own types.use egui_scale::EguiScale;
fn show_large_labels(ui: &mut egui::Ui) {
ui.vertical(|ui| {
ui.style_mut().scale(2.0);
ui.label("This is a large label");
ui.label("This is another large label");
});
}
Add the following to your Cargo.toml:
[dependencies]
egui-scale = "0.1.0"
egui-scale?When building scalable and responsive UIs with egui, you often need to adjust sizes, margins, and other visual properties dynamically. egui-scale simplifies this process by providing a unified interface for scaling these properties.
Contributions are welcome! Feel free to open issues or submit pull requests on the GitHub repository.
This project is licensed under the MIT License.
Happy coding with egui-scale! 🚀