main: fix scroll bar width

This commit is contained in:
hinto.janai 2023-12-26 11:45:16 -05:00
parent ab8322c2d0
commit 0d63429dfe
No known key found for this signature in database
GPG key ID: D47CE05FA175A499

View file

@ -827,7 +827,10 @@ fn init_text_styles(ctx: &egui::Context, width: f32, pixels_per_point: f32) {
style.spacing.icon_width_inner = width / 35.0; style.spacing.icon_width_inner = width / 35.0;
style.spacing.icon_width = width / 25.0; style.spacing.icon_width = width / 25.0;
style.spacing.icon_spacing = 20.0; style.spacing.icon_spacing = 20.0;
style.spacing.scroll_bar_width = width / 150.0; style.spacing.scroll = egui::style::ScrollStyle {
bar_width: width / 150.0,
..egui::style::ScrollStyle::solid()
};
ctx.set_style(style); ctx.set_style(style);
// Make sure scale f32 is a regular number. // Make sure scale f32 is a regular number.
let pixels_per_point = crate::free::clamp_scale(pixels_per_point); let pixels_per_point = crate::free::clamp_scale(pixels_per_point);