Skip to content

Commit

Permalink
Revert removal of non-HiDpi scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
KoffeinFlummi committed Nov 4, 2023
1 parent 16e8c32 commit 0c0cf17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ impl Sam {
style.text_styles.insert(Heading, FontId::new(14.0, Proportional));
ctx.set_style(style.clone());

// Prevent unnecessarily large UI on non-high-DPI displays
#[cfg(not(target_arch = "wasm32"))]
if ctx.pixels_per_point() > 1.0 && ctx.pixels_per_point() <= 1.5 {
ctx.set_pixels_per_point(1.0);
}

// Top menu bar
egui::TopBottomPanel::top("menubar").min_height(30.0).max_height(30.0).show(ctx, |ui| {
ui.set_enabled(!self.archive_window_open);
Expand Down

0 comments on commit 0c0cf17

Please sign in to comment.