Skip to content

Commit

Permalink
fix best/largest fit using wrong scaling in fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Jun 29, 2024
1 parent 27c032d commit 4f3d64a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,11 @@ impl App {
if wgpu.window.fullscreen().is_none() {
self.menu_bar(wgpu, ctx);
self.bottom_bar(ctx);
self.top_bar_size = TOP_BAR_SIZE;
self.bottom_bar_size = BOTTOM_BAR_SIZE;
} else {
self.top_bar_size = 0.0;
self.bottom_bar_size = 0.0;
}

self.resize_ui(ctx);
Expand Down Expand Up @@ -571,13 +576,9 @@ impl App {
let fullscreen = wgpu.window.fullscreen();
if fullscreen.is_some() {
wgpu.window.set_fullscreen(None);
self.top_bar_size = TOP_BAR_SIZE;
self.bottom_bar_size = BOTTOM_BAR_SIZE;
} else {
wgpu.window
.set_fullscreen(Some(Fullscreen::Borderless(None)));
self.top_bar_size = 0.0;
self.bottom_bar_size = 0.0;
}
self.largest_fit();
}
Expand Down

0 comments on commit 4f3d64a

Please sign in to comment.