-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scaling #23
Comments
Can you test whether the issue still occurs when you are just using egui without catppuccin-egui? If so, it's probably an issue with egui in general and you should file a bug report with them. |
Thanks. These are my Ubuntu settings. You can see VSCode to the right side which works nicely at the 150% scaling. This is the demo with scaling set at default 1.25. and scaling 2.0. As you say, this might be an egui issue or perhaps the scaling needs to be determined each time by checking screen resolution. |
Would you mind building your program without catppuccin-egui and checking whether the problem persists? That way we can determine whether the problem is with egui or catppuccin-egui. |
The first image shows an almost-default eframe template build. As shown, the scaling factor is 1.0. As an aside, note that the aliasing is a bit jagged around the radio buttons and elsewhere. The next image is the same code minus The last image is a fresh download of catppuccin for egui. I updated the following from 0.26 to 0.29 and ran
Hope that helps :-) |
To clarify, are you saying that the scaling is fine on the eframe demo regardless of whether catppuccin-egui is applied or not, but messed up in catppuccin-egui’s todo example? As for the problem with jagged and clipped borders, this is most likely because catppuccin-egui defines a border color and egui’s default theme does not, so the problem is not apparent with the default theme. To test this, you could run the following code in that eframe demo without catppuccin-egui, and report the bug to egui if the problem persists. If the bug doesn’t get fixed by egui, then catppuccin-egui can add some kind of configuration option to disable borders, but I’d prefer to avoid increasing the API surface if possible. fn add_border(old: egui::style::WidgetVisuals) -> egui::style::WidgetVisuals {
egui::style::WidgetVisuals {
bg_stroke: egui::Stroke {
color: egui::Color32::from_rgb(255, 0, 0),
..old.bg_stroke
},
..old
}
}
let old = ctx.style().visuals;
ctx.set_visuals(egui::Visuals {
widgets: egui::style::Widgets {
noninteractive: add_border(old.widgets.noninteractive),
inactive: add_border(old.widgets.inactive),
hovered: add_border(old.widgets.hovered),
active: add_border(old.widgets.active),
open: add_border(old.widgets.open),
},
..old
}); |
On my PC (2560x1440) the scaling is great. On Macbook Air (retina display) and Ubuntu on Thinkpad (2440x1920?) the fonts and check boxes are all far too small. To fix,
todo.rs
line 105 needs adjusting:ctx.set_pixels_per_point(1.25);
Can this be adjusted automatically?
The text was updated successfully, but these errors were encountered: