-
|
Hi, I want to have access to scale of everything so I can make ui larger and easier to work around. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
|
If you want to scale the entire GUI use the To change the fonts use |
Beta Was this translation helpful? Give feedback.
-
|
Could anyone explain this to me? For instance where do I put Context::set_pixels_per_point() in the "Hello world" example: https://github.com/emilk/egui/blob/master/examples/hello_world/src/main.rs And what is the default value of this? |
Beta Was this translation helpful? Give feedback.
-
|
Regarding |
Beta Was this translation helpful? Give feedback.
-
|
Hi, if someone ended up here trying to find a way to set text size for individual elements, you can use ui.label(egui::RichText::new("Big label").size(140.0));
let _ = ui.button(egui::RichText::new("Big button").size(140.0));This might be little bit off-topic, but it took me some time to find it, and Google kept suggesting me this discussion as the first result. So, maybe it will help someone in the future. |
Beta Was this translation helpful? Give feedback.
If you want to scale the entire GUI use the
pixels_per_pointoption (the native example app has a slider for gui scale). For the web version just zoom the web page (like you would any web page).To change the fonts use
set_fonts. In the example forFontDefinitionsyou can see how the font size for buttons is set: https://docs.rs/egui/0.9.0/egui/struct.FontDefinitions.html